2. Mu-plugins
● Require manual installation
● Activate automatically
● Are persistent
● Do not work in subdirectories like regular plugins*
● Should not alter the DB schema**
3. Mu-plugins
● Require manual installation
● Activate automatically
● Are persistent
● Do not work in subdirectories like regular plugins*
● Generally should not alter the DB schema**
* There are methods and mu-plugin managers to help use regular plugins as mu’s
4. Mu-plugins
● Require manual installation
● Activate automatically
● Are persistent
● Do not work in subdirectories like regular plugins*
● Generally should not alter the DB schema**
* There are methods and mu-plugin managers to help use regular plugins as mu’s
** This is a use at your own risk kind of situation
7. Why use mu-plugins?
● They grant you abilities that other systems of
modification do not (dropins, themes, plugins)
8. ● They grant you abilities that other do not
(dropins, themes, plugins)
● The persistence model can be used to your
advantage (library code, api’s etc...)
Why use mu-plugins?
16. Let’s take a deeper look at some code!!!
https://github.com/mikelking/singleton_base
000-singleton-base.php
010-base-plugin.php
17. So what’s the point?
● Can’t I just add the css to the main style sheet?
18. So what’s the point?
● Can’t I just add the css to the main style sheet?
● Or put it in it’s own file and @import it?
19. So what’s the point?
● Can’t I just add the css to the main style sheet?
● Or put it in it’s own file and @import it?
● Or enqueue it through function.php?
20. So what’s the point?
● Can’t I just add the css to the main style sheet?
● Or put it in it’s own file and @import it?
● Or enqueue it through function.php?
● Really I’m having trouble connecting the dots, man.
21. Well the point is that:
None of those methods are future proof.
You are responsible for reimplemention after EVERY
update.
None of those methods are easy to troubleshoot.
A plugin built like this can be turned off
Hey man this is just a high level example.
Actually this is a real world example.
22. Unlock the power of
WordPress
Using mu-plugins
By Mikel King
This has been: