WordPress WP-CLI 2 cheatsheet

WordPress WP-CLI 2: Plugins

7 common WordPress WP-CLI 2 tasks.

List plugins

Show installed plugins with their status and available updates.

wp plugin list

Install and activate a plugin

Download a plugin from WordPress.org and activate it.

wp plugin install woocommerce --activate

Activate a plugin

Activate an installed plugin.

wp plugin activate akismet

Deactivate a plugin

Turn a plugin off without deleting it. Useful when a plugin breaks the site.

wp plugin deactivate akismet

Deactivate every plugin

Turn off all plugins to find out which one causes a problem.

wp plugin deactivate --all

Update all plugins

Update every plugin that has a newer version.

wp plugin update --all

Caution: Take a database backup first. Plugin updates can break a site.

Delete a plugin

Remove an inactive plugin's files.

wp plugin delete hello

Was this page helpful?