tivwp / tivwp-force-deactivate-plugins
TIVWP Force Deactivate Plugins
Installs: 18
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 1
Type:wordpress-muplugin
pkg:composer/tivwp/tivwp-force-deactivate-plugins
Requires
- composer/installers: ^1.0
- roave/security-advisories: dev-master
This package is not auto-updated.
Last update: 2025-10-26 07:37:35 UTC
README
Automatically disables plugins on production server.
If the WP_LOCAL_DEV define is NOT true, disables plugins that you specify.
This is the reverse logic of the CWS_Disable_Plugins_When_Local_Dev by Mark Jaquith (@markjaquith).
To install
- Make sure you have the following settings in your project's composer.json:
{
	"require": {
		"composer/installers": "^1.0"
	},
	"extra": {
		"installer-paths": {
			"path/to/mu-plugins/{$name}/": [
				"type:wordpress-muplugin"
			]
		}
	}
}
- Run this in your project's root folder:
composer require tivwp/tivwp-force-deactivate-plugins
- The plugin files will be installed in the path/to/mu-plugins/tivwp-force-deactivate-pluginsfolder. However, WordPress ignores subfolders in themu-plugins. Therefore, you need to copy thetivwp-force-deactivate-plugins.phpone level up, to themu-plugins.
Settings
- Put this to a local config file (excluded from the repo):
define( 'WP_LOCAL_DEV', true );
- and this - to the wp-config.php(edit, of course):
define( 'TIVWP_LOCAL_DEV_PLUGINS', array( 'debug-bar/debug-bar.php', 'query-monitor/query-monitor.php', 'tivwp-email/tivwp-email.php', ) );
Author
- Gregory Karpinsky (@tivnet)
License
GPL-3.0