WordPress Must-Use Plugins

Presented by Ronald Huereca

WordCamp Norway - January 14, 2012

What is a Must-Use Plugin?
It's a Plugin That Cannot be Uninstalled
Why Use MU-Plugins?
  • For critical functionality that must not be disabled.
  • For Network-wide settings if on Multisite.
  • Snippets of code that don't quite fit a plugin.
Benefits of MU-Plugins
  • It cannot be disabled.
  • It cannot be edited.
  • Easy to drop in.
Drawbacks of MU-Plugins
  • It cannot be disabled or upgraded.
  • No automatic updates (the code will need to be maintained by you).
  • No activation actions are initiated.
  • No folder structure unless you include a base file.
  • You can bring a network down with a simple PHP error.
Where to Install a MU-Plugin?
MU-Plugin Folder Structure
Create the mu-plugins folder
MU-Plugins Folder
What I've Used mu-plugins for...
  1. Initializing custom post types and/or taxonomies
  2. Handling redirects
  3. Removing admin menus
  4. Removing dashboard widgets
  5. Disabling the admin bar
All of these plugins can be written as regular plugins…
…But if the functionality is critical to the project, don’t even allow the option to disable.
Further Reading
Any Questions?
Created with WP Presenter Pro
Scroll to Top
Scroll to Top