Bug #4799
closedCritical plugins for the main Commons site should be loaded programatically
0%
Description
During a recent Commons upgrade, I wrote a script that accidentally deactivated a bunch of stuff on the main Commons site. This was an extreme example of something going wrong, but it points toward a more general problem that it's possible to deactivate critical functionality on the main site, through the wp-admin/plugins.php interface.
We should load our critical libraries in such a way that they cannot be deactivated. The most straightforward way to do this is in an mu-plugin, which bootstraps each relevant plugin directly. (We could then add these plugins manually to the 'active_plugins' array, so that they show up in the plugins.php list, though this is not strictly necessary.)
Ray, have you done this before? Anything to watch out for? Loading from mu-plugins will mean that items are loaded in a somewhat different order than they currently are - by muplugins_loaded rather than plugins_loaded - though this could be mitigated by putting everything inside of a 'plugins_loaded' callback in the mu-plugin.