MU-Plugins Folder & Network Enabled Plugins: Questions.

In reference to: https://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/?utm_expid=3606929-44.dPUm5UCGQ86T8TjlZLdigg.0&utm_referrer=https%3A%2F%2Fwww.google.com%2F

Is there a list somewhere of which plugins need to be placed in the mu-plugins directory - and which do not?
Also - I read "These are activated by default, affecting all sites on a WordPress Multisite installation." Does this mean that I can place a 3rd party plugin in this folder and it will force use of it across the network as opposed to being an optional plugin?

Does this mean that I should place all plugins that are absolutely required to run the network - such as ProSites and and other network-related plugins in this folder?

I am having trouble understanding why this is necessary if we have the option to network activate plugins or not.

  • Vinod Dalvi

    Hi @StudioSelf,

    I hope you are well today and thank you for your questions.

    Must-use plugins (a.k.a. mu-plugins) are plugins installed in a special directory inside the content folder and which are automatically enabled on all sites in the installation. Must-use plugins do not show in the default list of plugins on the Plugins page of wp-admin – although they do appear in a special Must-Use section – and cannot be disabled except by removing the plugin file from the must-use directory, which is found in wp-content/mu-plugins by default.

    So they are basically same as network enabled plguins but having the following differences :

    Always-on, no need to enable via admin and users cannot disable by accident.
    Can be enabled simply by uploading file to the mu-plugins directory, without having to log-in.
    Loaded by PHP, in alphabetical order, before normal plugins, meaning API hooks added in an mu-plugin apply to all other plugins even if they run hooked-functions in the global namespace.

    You will find more information about Mu plugins on the following pages.

    https://codex.wordpress.org/Must_Use_Plugins
    https://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/
    http://www.sitepoint.com/wordpress-mu-plugins/

    Is there a list somewhere of which plugins need to be placed in the mu-plugins directory - and which do not?

    No there isn't as you can use any well developed plugin in the mu-plugins directory and it's your decision to whether network activate the plugin or make it mu plugin if you need the above mentioned features.

    Please note files in the /wp-content/mu-plugins directory are executed automatically but if you add whole plugin directory in it then it won't execute like directories added in wp-content/plugins directory so you have to extract the files and folders from plugin directory and add it in the /wp-content/mu-plugins directory.

    Also - I read "These are activated by default, affecting all sites on a WordPress Multisite installation." Does this mean that I can place a 3rd party plugin in this folder and it will force use of it across the network as opposed to being an optional plugin?

    Yes you are right.

    Does this mean that I should place all plugins that are absolutely required to run the network - such as ProSites and and other network-related plugins in this folder?

    No you can just network enable those plugins as the network enabled plugins can't be disabled other than network admin.

    You should only place the plugins in the mu-plugins directory where you need any of the following functionality.

    Always-on, no need to enable via admin and users cannot disable by accident.
    Can be enabled simply by uploading file to the mu-plugins directory, without having to log-in.
    Loaded by PHP, in alphabetical order, before normal plugins, meaning API hooks added in an mu-plugin apply to all other plugins even if they run hooked-functions in the global namespace.

    Cheers,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.