In this article we list a number of useful WP-CLI commands you can run to administer your WordPress website from terminal.
List active plugins on your WordPress site
wp plugin list --status=active
Deactivate a plugin
wp plugin deactivate pluginname
Replace pluginname with the name of your plugin you want to deactivate. For example, to deactivate the ‘hello’ plugin run the following command;
wp plugin deactivate hello
Delete a plugin
wp plugin delete pluginname
Replace pluginname with the name of your plugin you want to delete. For example, to delete the ‘hello’ plugin run the following command;
wp plugin delete hello
Activate a plugin
wp plugin activate pluginname
Replace pluginname with the name of your plugin you want to activate. For example, to activate the ‘hello’ plugin run the following command;
wp plugin activate hello
Install a plugin
wp plugin install pluginname
Replace pluginname with the name of your plugin you want to install. For example, to install the ‘hello’ plugin run the following command;
wp plugin install hello
Install and activate plugin
wp plugin install pluginname --activate
Replace pluginname with the name of your plugin you want to install and activate. For example, to install and activate the ‘hello’ plugin run the following command;
wp plugin install hello --activate