60Web60

Managing plugins with WP-CLI

WP-CLI3 min read·

WP-CLI plugin commands let you list, install, activate, deactivate, update, and delete plugins without using the WordPress dashboard. This is especially useful when a plugin is causing problems and you cannot access the dashboard, or when you want to bulk-update all plugins at once.

Command reference

CommandWhat it does
wp plugin listLists all installed plugins with their status and version
wp plugin list --status=activeLists only active plugins
wp plugin list --status=inactiveLists only inactive plugins
wp plugin install <slug>Installs a plugin from WordPress.org by its slug
wp plugin install <url>Installs a plugin from a ZIP URL (for premium plugins)
wp plugin install <slug> --activateInstalls and immediately activates a plugin
wp plugin activate <slug>Activates an installed plugin
wp plugin deactivate <slug>Deactivates a plugin without deleting it
wp plugin deactivate --allDeactivates every plugin (useful for troubleshooting)
wp plugin update <slug>Updates a specific plugin to its latest version
wp plugin update --allUpdates all plugins to their latest versions
wp plugin update --all --dry-runShows what would be updated without making changes
wp plugin delete <slug>Permanently deletes a plugin and its files
wp plugin status <slug>Shows the status and version of a specific plugin

Deactivating all plugins to troubleshoot

If your site is broken and you suspect a plugin is the cause, you can deactivate all plugins at once and then reactivate them one by one to find the problem.

  1. Deactivate all plugins:
wp plugin deactivate --all
  1. Check if your site is working again by visiting it in your browser.

  2. Reactivate plugins one at a time:

wp plugin activate <slug>
  1. After activating each plugin, check your site. When the problem returns, you have found the plugin causing the issue.

Installing plugins

Plugins can be installed by slug (from WordPress.org) or by URL (for premium plugins hosted elsewhere).

Install from WordPress.org:

wp plugin install contact-form-7 --activate

Install from a ZIP URL:

wp plugin install https://example.com/my-premium-plugin.zip --activate

Warning about destructive commands

Running wp plugin delete permanently removes the plugin files from your site. This cannot be undone. Always take a backup before deleting plugins.

Need help?

If you have questions about managing plugins, visit our support page or email hello@smarthost.ie.

Frequently asked questions

How do I find a plugin's slug?

The slug is the last part of the plugin's WordPress.org URL. For example, wordpress.org/plugins/contact-form-7 has the slug contact-form-7.

Can I install premium plugins with WP-CLI?

Yes. Use wp plugin install <url> where the URL points to the plugin's ZIP file. You will need a direct download link.

What is wp plugin update --dry-run for?

It shows you a list of plugins that have updates available without actually applying any updates. Useful for reviewing before committing to the changes.

Last updated: 25 March 2026

Still need help?

Contact our support team for personalised assistance.

Contact Support