Skip to content

Instantly share code, notes, and snippets.

jb-alvarado / disable-plugins-in-development.php
Last active Jun 14, 2018
Disable specified WordPress plugins in your development environment. Useful for plugins that either make network calls you don't want when working (eg, auto-posting to Facebook), or for plugins that rely on services only available in production (eg, Varnish).
View disable-plugins-in-development.php
* Disable specified plugins in your development environment.
* This is a "Must-Use" plugin. Code here is loaded automatically before
* regular plugins load. This is the only place from which regular plugins
* can be disabled programatically.
* Place this code in a file in WP_CONTENT_DIR/mu-plugins or specify a
* custom location by setting the WPMU_PLUGIN_URL and WPMU_PLUGIN_DIR