Wp plugin delete (WP-CLI): verschil tussen versies
Naar navigatie springen
Naar zoeken springen
(Nieuwe pagina aangemaakt met 'E.g.: wp plugin delete hello wp plugin delete contact-form-7 * By itself, WP-CLI can delete files. It probably depends on the overall right configuration if thi...') |
|||
(Een tussenliggende versie door dezelfde gebruiker niet weergegeven) | |||
Regel 1: | Regel 1: | ||
+ | <pre> | ||
+ | $ wp help plugin delete | ||
+ | |||
+ | NAME | ||
+ | |||
+ | wp plugin delete | ||
+ | |||
+ | DESCRIPTION | ||
+ | |||
+ | Deletes plugin files without deactivating or uninstalling. | ||
+ | |||
+ | SYNOPSIS | ||
+ | |||
+ | wp plugin delete [<plugin>...] [--all] | ||
+ | |||
+ | OPTIONS | ||
+ | |||
+ | [<plugin>...] | ||
+ | One or more plugins to delete. | ||
+ | |||
+ | [--all] | ||
+ | If set, all plugins will be deleted. | ||
+ | |||
+ | EXAMPLES | ||
+ | |||
+ | # Delete plugin | ||
+ | $ wp plugin delete hello | ||
+ | Deleted 'hello' plugin. | ||
+ | Success: Deleted 1 of 1 plugins. | ||
+ | |||
+ | # Delete inactive plugins | ||
+ | $ wp plugin delete $(wp plugin list --status=inactive --field=name) | ||
+ | Deleted 'tinymce-templates' plugin. | ||
+ | Success: Deleted 1 of 1 plugins. | ||
+ | </pre> | ||
+ | |||
E.g.: | E.g.: | ||
Regel 4: | Regel 40: | ||
wp plugin delete contact-form-7 | wp plugin delete contact-form-7 | ||
− | + | Note: | |
− | * Plugins don't need to be stopped before deletion | + | |
+ | * Plugins supposingly don't need to be stopped before deletion - I'm not sure about this: It would depend on the plugin | ||
* ''Must-use (mu) plugins'' cannot be stopped. You can only stop them through deleting them. | * ''Must-use (mu) plugins'' cannot be stopped. You can only stop them through deleting them. | ||
− | == | + | == Deactivate, delete & uninstall == |
+ | |||
+ | * With [[Wp plugin delete (WP-CLI) | wp plugin delete]], files are deleted without uninstallation or deactivation | ||
+ | * With [[Wp plugin deactivate (WP-CLI) | wp plugin deactivate]] the plugin is being stopped. No files or settings are affected | ||
+ | * With [[Wp plugin uninstall (WP-CLI) | wp plugin uninstall]], the uninstall-script of the plugin is executed, after which the files are deleted. The plugin is not deactivated first. | ||
+ | |||
+ | 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): | ||
+ | |||
+ | # Deactivate | ||
+ | # Uninstall | ||
+ | |||
+ | == See also == | ||
* [[Hoofdpagina#WP-CLI | Home page » WP-CLI]] | * [[Hoofdpagina#WP-CLI | Home page » WP-CLI]] | ||
* [[Wp plugin (WP-CLI) | wp plugin]] | * [[Wp plugin (WP-CLI) | wp plugin]] | ||
+ | * [[Wp plugin uninstall (WP-CLI) | wp plugin uninstall]] |
Huidige versie van 5 okt 2022 om 19:16
$ wp help plugin delete NAME wp plugin delete DESCRIPTION Deletes plugin files without deactivating or uninstalling. SYNOPSIS wp plugin delete [<plugin>...] [--all] OPTIONS [<plugin>...] One or more plugins to delete. [--all] If set, all plugins will be deleted. EXAMPLES # Delete plugin $ wp plugin delete hello Deleted 'hello' plugin. Success: Deleted 1 of 1 plugins. # Delete inactive plugins $ wp plugin delete $(wp plugin list --status=inactive --field=name) Deleted 'tinymce-templates' plugin. Success: Deleted 1 of 1 plugins.
E.g.:
wp plugin delete hello wp plugin delete contact-form-7
Note:
- Plugins supposingly don't need to be stopped before deletion - I'm not sure about this: It would depend on the plugin
- Must-use (mu) plugins cannot be stopped. You can only stop them through deleting them.
Deactivate, delete & uninstall
- With wp plugin delete, files are deleted without uninstallation or deactivation
- With wp plugin deactivate the plugin is being stopped. No files or settings are affected
- With wp plugin uninstall, the uninstall-script of the plugin is executed, after which the files are deleted. The plugin is not deactivated first.
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):
- Deactivate
- Uninstall