Wp plugin uninstall (WP-CLI)

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

NAME

  wp plugin uninstall

DESCRIPTION

  Uninstalls one or more plugins.

SYNOPSIS

  wp plugin uninstall [<plugin>...] [--deactivate] [--skip-delete] [--all]

OPTIONS

  [<plugin>...]
    One or more plugins to uninstall.

  [--deactivate]
    Deactivate the plugin before uninstalling. Default behavior is to warn and skip if the plugin is active.

  [--skip-delete]
    If set, the plugin files will not be deleted. Only the uninstall procedure
    will be run.

  [--all]
    If set, all plugins will be uninstalled.

EXAMPLES

    $ wp plugin uninstall hello
    Uninstalled and deleted 'hello' plugin.
    Success: Uninstalled 1 of 1 plugins.

Uninstall, deactivate & delete

  • Uninstall probably means, that associated settings are removed from the database. This probably depends on whether an uninstall-routine that has been included with the script
  • 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