The reason plugins in the mu-plugins
folder can’t be activated in the plugins page is because that’s not how mu-plugins
works. The mu
stands for must use.
Improtant things to know:
mu-plugins
load beforeplugins
- WP loads PHP files in the
mu-plugins
folder- it does not search subfolders
- it does not look for plugin headers
- PHP files in the
mu-plugins
folder have no activation status, they are always loaded.- this is true for all sites in a multisite, there is no conditional loading.
So code in the mu-plugins
folder will never have an activate/deactivate link. You can never put code in both mu-plugins
and plugins
. You also can’t just put a plugin in mu-plugins
, it needs a PHP file that includes the plugins main file to work.
mu-plugins
is a folder of PHP files, where WP loads all the PHP files before it loads the plugins or themes.