WordPress has quite a few hidden features. My favourite so far: MU Plugins, or “must-use plugins”. Introduced with WP 3.0, the code says:
/** * Check the mu-plugins directory and retrieve all mu-plugin files with any plugin data. * * WordPress only includes mu-plugin files in the base mu-plugins directory (wp-content/mu-plugins). * * @since 3.0.0 * @return array Key is the mu-plugin file path and the value is an array of the mu-plugin data. */
Basically, this means: anything you put in wp-content/mu-plugins/ will get automatically included in WordPress. But it has to be a .php file directly within the mu-plugins directory, like: wp-content/mu-plugins/myplugin.php. Folders don’t work, unless you include a .php folder that loads in files from a subdirectory.
This is pretty huge. For example, I use it to load up a small library of sub-plugins and global settings for all our WordPress sites.
Example: we have a plugin with an ad widget that we use across our network of blogs. I can just drop my ad widget plugin into mu-plugins/ and never have to worry about someone accidentally de-activating it.
- How to Avoid Common Pitfalls and Ensure a Smooth WordPress 3.1 Upgrade (pressography.com)