Bedrock Plugin Disabler
Disable certain plugins in non-production environments using PHP constants.
by Lukas Besch, Kamil Grzegorczyk · github.com/lukasbesch/bedrock-plugin-disabler · website
★ 55stars
7forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/lukasbesch/bedrock-plugin-disabler/archive/refs/heads/master.zipFrom the readme
Bedrock Plugin Disabler
Define an array of plugins that deactivate automatically in certain environments (e.g. caching plugins in development).
Inspired by this blog post by Kamil Grzegorczyk.
Uses a fork of the DisablePlugins class written by Mark Jaquith.
Installation
This plugin is designed to work with Bedrock based sites, and will not work with a Standard WordPress installation.
It will be installed as a wordpress-muplugin.
If you try to activate it as a regular plugin, the plugin will deactivate itself with a notice.
Manual Installation (not recommended)
Download the latest release and place it in your web/app/mu-plugins folder.
Usage
Define the constant DISABLEDPLUGINS with an array of the plugins main files you want to deactivate in your preferred environment configuration, for example config/environments/development.php:
If you have an older Bedrock installation (< 1.9.0) you have to define the constant using the regular define() function:
You can also provide serialized data:
php
Config::define('DISABLEDPLUGINS', serialize([
'autoptimize/autoptimize.php',
]));
Read the full README on GitHub →
Releases
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.