Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In wordpress multisite how can I allow users to install their own plugins?

Tags:

wordpress

My goal is to make it so users can upload their own plugins and themes, and I would like to add most of the things that are in the normal non-multisite WordPress admin as well. What files control the multisite user dashboard in WordPress?

like image 553
Demosthenes Avatar asked Mar 10 '13 22:03

Demosthenes


1 Answers

The short answer is: you can't.

Only the main site has a /wp-content/ folder, all the sub sites are virtualized and share the /themes/ and /plugins/ folder with the main site.

From the Codex, Create_A_Network my emphasis :

A multisite network is a collection of sites that all share the same WordPress installation. They can also share plugins and themes. The individual sites in the network are virtual sites in the sense that they do not have their own directories on your server, although they do have separate directories for media uploads within the shared installation, and they do have separate tables in the database.

[...]

Installing themes and plugins is different: for example, each individual site of a network can activate both, but install neither.

To achieve what you want, you'd have to grant Super Admin capabilities to your users. Meaning that they'd have full access to the whole network.

The files that control a Multisite are contained in the folder /wp-admin/network/, but "some are just wrappers for regular admin files one level up".

For example, inside the file /wp-admin/plugins.php we have the following which means roughly "if it's Multisite, you can't install plugins":

if ( ( ! is_multisite() || is_network_admin() ) && current_user_can('install_plugins') ) { 
?>
    <a href="<?php echo self_admin_url( 'plugin-install.php' ); ?>" class="add-new-h2"><?php echo esc_html_x('Add New', 'plugin'); ?></a>
<?php }

With that said, there are some plugins to help with the management of Multisite plugins, but not for the purposes you want: http://wordpress.org/extend/plugins/search.php?q=multisite+plugins

like image 89
brasofilo Avatar answered Nov 03 '22 23:11

brasofilo