[wp-trac] [WordPress Trac] #60504: Plugin dependencies: Account for mu-plugin as dependency

WordPress Trac noreply at wordpress.org
Mon Feb 12 17:10:09 UTC 2024


#60504: Plugin dependencies: Account for mu-plugin as dependency
----------------------------------------+---------------------
 Reporter:  johnbillion                 |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  6.5
Component:  Upgrade/Install             |     Version:  trunk
 Severity:  critical                    |  Resolution:
 Keywords:  needs-testing dev-feedback  |     Focuses:
----------------------------------------+---------------------

Comment (by johnbillion):

 Replying to [comment:4 afragen]:
 > Does a plugin like WooCommerce, if loaded as an mu-plugin, show as an
 active plugin?

 The "loader" that you need to place in the root of the `wp-content/mu-
 plugins` directory does. It's listed under the "Must-Use" tab on the
 Plugins screen. It's not required to have a plugin header, but if it does
 then the info will appear there.

 Mu-plugins are manually managed. They don't get checked for nor receive
 auto updates, and because the mu-plugin system in WordPress only looks at
 `.php` files in the root of the `wp-content/mu-plugins` directory it means
 that any plugin in a subdirectory needs a corresponding "loader" file
 which is arbitrary. Examples:

 * https://github.com/Automattic/vip-go-mu-
 plugins/blob/develop/jetpack.php#L546-L589
 * https://github.com/Automattic/vip-go-mu-
 plugins/blob/baa497d021588900a22ca9c7583de908c63d5fba/query-
 monitor.php#L70-L72
 * https://github.com/humanmade/mu-plugins-
 loader/blob/92eba0ddd09449ecb884acb1301af01fb0e50122/loader.php#L16-L24

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60504#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list