Wp plugin deactivate (WP-CLI)

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen
$ wp help plugin deactivate


  wp plugin deactivate


  Deactivates one or more plugins.


  wp plugin deactivate [<plugin>...] [--uninstall] [--all] [--network]


    One or more plugins to deactivate.

    Uninstall the plugin after deactivation.

    If set, all plugins will be deactivated.

    If set, the plugin will be deactivated for the entire multisite network.


    # Deactivate plugin
    $ wp plugin deactivate hello
    Plugin 'hello' deactivated.
    Success: Deactivated 1 of 1 plugins.

You can deactivate multiple plugins at once, by separating the names by spaces (not by commas):

wp plugin deactivate wp-rocket redis-cache wp-dbmanager iwp-client

Deactivate, delete & uninstall

  • With wp plugin deactivate the plugin is being stopped. No files or settings are affected
  • With wp plugin delete, files are deleted without uninstallation or deactivation
  • With wp plugin uninstall, the uninstall-script of the plugin is executed, after which the files are deleted. The plugin is not deactivated first. You can't first delete and then uninstall, because after delete all files are gone, including the uninstall-script.

So, if you want to be thorough and sure that no trace of a given plugin is left (good luck with that - this depends on the quality of the uninstall-script and might not always be possible at all):

  1. Deactivate
  2. Uninstall

See also