Goal: Disable and Enabled WordPress Plugins via the Command Line
Today i’m going to show you how to disable and enable wordpress plugins via the command line
Installation
Download these two files to the root of your wordpress installation (same folder where wp-config is)
# wget "http://www.packetmischief.ca/files/wp/wp_enable_plugins.php" # wget "http://www.packetmischief.ca/files/wp/wp_disable_plugins.php"
Usage
Run wp_disable_plugins.php with no parameters to return a list of active plugins:
# php wp_disable_plugins.php Active plugins: - akismet/akismet.php - broken-link-checker/broken-link-checker.php - ecwid-shopping-cart/ecwid-shopping-cart.php - google-analyticator/google-analyticator.php - si-captcha-for-wordpress/si-captcha.php Specify plugin name(s) from above on the command line to disable them.
once you have determined the plugin to disable run the same command again and append the plugin name:
Example:
# php wp_disable_plugins.php
Here’s an example where i’m disabling si-captcha-for-wordpress
# php wp_disable_plugins.php si-captcha-for-wordpress/si-captcha.php Disabled 1/1 plugins.
That’s how you disable enable wordpress plugin command line