Running a WordPress Plugin, always…

Development
As seen on my local WP development environment
As seen on my local WP development environment

Sometimes you’ve created a site with WordPress standard (not single user), but have had allow the site owners or users to have full admin access to it.  You have plugin and theme dependencies, and if the site owner disables that plugin, you have problems.

For example, you’ve written a plugin that carries out a certain range of syndication functions for your client.  If the client accidentally disables it he will lose money, and you will have a call-out, potentially an angry one, when he finds out.  He wants admin access, but you know he’s dangerous with it.

So, since WordPress 2.8 you’ve had the facility to create a folder in wp-content called mu-plugins.  It will work just like the mu-plugins folder in WordPress MU – as in, any plugin placed there, will run automatically.  Activation code won’t fire off, but apart from that, so long as the plugin is correctly written, everything will work.

I’m not sure if this change is a part of allowing ‘must-use’ plugins support, as suggested in http://core.trac.wordpress.org/changeset/10737 or if it’s also planned as part of the move towards merging WP single user and WP-MU.  Either way, it’s an incredibly useful tool for those of us who set up and configure sites for clients who are a little prone to fiddling.

Watch out for plugin updates – you can’t auto-update anything in mu-plugins, and you won’t receive any notifications.  Be aware that you have to stay on top of this by yourself, just like in the old days!