Skip to content

/client-mu-plugins directory

On the VIP Platform the /mu-plugins directory is not directly accessible, and will not appear in a site’s code repository. Instead, plugins can be loaded as MU (“must use”) plugins by adding them to the /client-mu-plugins directory found in the root of a site’s code repository. The /client-mu-plugins directory works similarly to WP_CONTENT_DIR . '/mu-plugins/' in a self-hosted WordPress installation.

If a plugin consists only of one file, that file can be added to the root of /client-mu-plugins and it will load as an MU plugin automatically. For example:
/client-mu-plugins/plugin-name.php

Plugins that are added to /client-mu-plugins with their own subdirectory must be loaded programmatically with a plugin-loader.php file, placed within the /client-mu-plugins directory.

Only custom plugins with code that needs to be auto-loaded, or code that needs to run earlier in the WordPress load process, should be added to the /client-mu-plugins directory. 

Third-party plugins should be loaded from the /plugins directory, as many of these plugins utilize the activation and deactivation hooks, neither of which are executed for MU plugins.

MU plugins behave differently than plugins installed in the /plugins  directory, and the pros and cons of each method should be reviewed and evaluated.

Last updated: July 07, 2022