[wp-trac] [WordPress Trac] #64665: Add mu-plugins loading filter
WordPress Trac
noreply at wordpress.org
Wed Feb 18 06:42:13 UTC 2026
#64665: Add mu-plugins loading filter
-----------------------------+------------------------------
Reporter: dd32 | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bootstrap/Load | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-----------------------------+------------------------------
Comment (by jorbin):
Some previous related discussion: #34936
First note is that documentation similar to what is on functions such as
`enable_wp_debug_mode_checks` and `enable_loading_advanced_cache_dropin `
explaining that these filters run before plugins are loaded would be
helpful.
For the regular plugins and network activated plugins, I think filtering
on the option makes more sense for two reasons:
1. When removing plugins, you avoid the wasted calls to things such as
`validate_file`.
2. When adding plugins, you get the benefit of things such as the
network_plugins collision prevention and recovery mode.
> In my case, I'd like to avoid loading any plugin content via a
sunrise.php file, before a wp-env environment is fully configured, but
without having to have to start the environment without mappings and then
add them in.
To avoid loading any mu-plugins, you can always define `WPMU_PLUGIN_DIR`
to a non directory in your sunrise.php. But this is hacky and an actual
extension point makes better sense.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64665#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list