Skip to content

WP CLI Commands

Imran Sayed edited this page Oct 4, 2020 · 1 revision

Update WordPress

Upgrade to the latest version

wp core update

Go back to an older version

wp core update --version=4.9.6 --force

Plugin Commands

wp plugin activate	Activates one or more plugins.
wp plugin deactivate	Deactivates one or more plugins.
wp plugin delete	Deletes plugin files without deactivating or uninstalling.
wp plugin get	Gets details about an installed plugin.
wp plugin install	Installs one or more plugins.
wp plugin is-active	Checks if a given plugin is active.
wp plugin is-installed	Checks if a given plugin is installed.
wp plugin list	Gets a list of plugins.
wp plugin path	
wp plugin search	Searches the WordPress.org plugin directory.
wp plugin status	Reveals the status of one or all plugins.
wp plugin toggle	Toggles a plugin’s activation state.
wp plugin uninstall	Uninstalls one or more plugins.
wp plugin update	Updates one or more plugins.

Plugin List

wp plugin list

Install and activate a plugin

# Install and activate new plugin
$wp plugin install woocommerce --activate
# deactivate a plugin
$wp plugin deactivate woocommerce
# Only activate a plugin
$wp plugin activate woocommerce
# Update plugins
$wp plugin update woocommerce
$wp plugin update --all