Basic delete operation
Deleting plugins is very easy; it is done with the –delete switch, e.g.
wordshell mysite akismet --delete
If you do not specify a plugin, then WordShell will operate on all plugins. So, to completely remove all plugins from a site, do this:
wordshell mysite --delete
More usefully, you can restrict the plugins indicated using the –inactive or –active switch. So, to delete all inactive plugins, do this:
wordshell mysite --delete --inactive
Or, to delete akismet from all sites where it is not active (and reduce your maintenance burden), do this:
wordshell all akismet --delete --inactive
Deactivation of plugins to be deleted
When WordShell deletes a plugiin, it automatically de-activates it first (equivalent to running with –deactivate). Therefore, you do not have to explicitly do this. However, if for some reason (perhaps the deactivate procedure is returning an error), you do not want to run the deactivate procedure first then add –skipdeactivate to your command line.
WordShell supports deletion of single-file plugins (i.e. those contained just in a .php file – no plugins from the WordPress plugin directory come into this category). So, you can now nuke all your copies of “Hello Dolly” with one quick command:
wordshell all hello.php --delete
Dry run and more verbose output
If you only want to see what would have happened, and not make any actual changes to the site, then add –dryrun to your command line. You can also add –debug to get more information on what is going on internally.
Restoring deleted plugins
WordShell keeps backups of all plugins that you delete. So deleting is a safe operation; you can always restore from the backup – see the relevant manual page.