Home » Blog » Installing WordPress Must Use Plugins

Installing WordPress Must Use Plugins

MU-plugins, known as WordPress ‘Must Use’ plugins, were introduced with WordPress 3.0 along with Multi Site and will only work on WordPress Multi Site installations.

The Must Use plugins are installed into a separate folder called mu-plugins under the wp-content folder.

The folder is not created by default and must be created manually so make sure you give it the correct CHMOD permission 0755 (or just 755 in some file managers).

You can change the default folder name by defining WPMU_PLUGIN_DIR and WPMU_PLUGIN_URL in your wp-config.php file.

What are Must Use Plugins?

Must User plugins are designed to have loading priority over regular plugins.  They are installed and activated by default and cannot be uninstalled from the Admin Dashboard even by Admins.

The plugin code files must be in the root mu-plugins folder at that level as sub-directories are not scanned for files as they are in the regular plugins folder and all the files need to me manually uploaded via FTP.  There is no installation screen for them.

If you need a sub-directory hierarchy for your must use plugins, create a loader file in the mu-plugins folder and list your files in that using the require() or require_once() PHP directives.  e.g.

require WPMU_PLUGIN_DIR.’/my-plugin/my-plugin.php’;

Management?  You’re on your own!

In the WordPress 3.0  beta there was a sub menu under the Plugins tab that would show you all the MU-plugins, however, I can’t see this in WordPress Multi Site 3.5.

The WordPress codex does mention that management of these plugins is a manual effort.

Because the MU-plugins do not show up in the dashboard, there are no update warnings so you have to keep an eye out for new versions and manually ftp them up to the mu-plugins folder.

Likewise, deactivating and deleting the plugins must also be done manually through cPanel File Manager or your FTP application.

Some Other Caveats

As well as the plugins not notifying of updates, you should be aware that activation hooks are not executed for plugins in the Must Use Plugins folder.

Many plugins use these activation hooks to install data and set up the plugin.  If that’s the case, then you need to be aware that this will not happen.

This shouldn’t break the plugin if it is written well but you will need to configure it from scratch.

It’s always best to check with the plugin author whether or not it is designed to work as a MU plugin.

Keep In Touch

Wil

Wil is a dad, consultant, developer, conference organiser, speaker and business mentor. He co-organizes the WordPress Sydney meetup group and has been on the orgnising committee for WordCamp Sydney since 2014. He speaks at many technical events and contributes to the WordPress open source project. His likes are chillies, craft beer and electrogravitics.
If You Enjoyed This Post
Join Our Newsletter
Give it a try, you can unsubscribe anytime.
Close