CHAPTER 7 • Making the Most of WordPress Plugins 175
activated, sometimes with some necessary settings, but that’s it. Regular plugins reside in the
wp-content/plugins/ folder and are activated as usual.
You already know all about how to use this type of plugin, so I’ll move along.
DROP-IN PLUGINS
Drop-in plugins, or drop-ins, are plugins meant to overwrite core functionality. You put them
directly in the wp-content folder to replace their corresponding core file — for example,
advanced-cache.php or db.php.
The following drop-ins are available. Remember, if you use them, you actually need to replace
the functionality they represent in the core; otherwise, you’ll probably have problems.
◾ advanced-cache.php for advanced caching
◾ db.php for a custom database class
◾ db-error.php for custom database error messages
◾ install.php for your own install scripts
◾ maintenance.php for custom maintenance messages
◾ object-cache.php for an external cache
◾ sunrise.php for executing things prior to multisite loads
◾ blog-deleted.php when blogs are deleted in a multisite
◾ blog-inactive.php for messages on inactive blogs for a multisite
◾ blog-suspended.php for messages on suspended blogs for a multisite
You should be careful with drop-ins. They are very powerful, though; chances are you’ve seen
them in action or perhaps even used them as a part of another plugin, especially drop-ins
such as advanced-cache.php for caching. Some are less hazardous to play with, such as adding
your own maintenance.php file, which is a nice way to give your readers a more personal
maintenance message when you’re upgrading your install.
MUST-USE PLUGINS
Must-use plugins differ a bit from regular plugins. They reside in wp-content/mu-plugins/,
and you can’t deactivate them from within the admin interface; the only way to deactivate a
must-use plugin is to remove it from the folder. Must-use plugins don’t need to contain plugin
headers; they will be executed nonetheless.
You can drop any plugin in the wp-content/mu-plugins/ folder, but you might have problems
with it depending on how it is built, especially across multisite networks, so proceed with
caution. It is better to use the plugin as it is meant to be used.
Must-use plugins are a great tool when you need to make sure that functionality stays active
and won’t accidentally be deactivated.