Updating plugins

This page is for installing new versions of plugins. If you want to roll back to a previously installed version, see the corresponding manual page.

Updating plugins is easy; simply specify the site and plugin. To install the latest version, add –latest. You can also add –update, though this is implied (it is the default mode of operation for WordShell):

wordshell mysite akismet --latest
or
wordshell mysite akismet --latest --update

In examples below, we omit the –update for brevity.

Note: Whenever WordShell updates a plugin, it takes a copy of the existing plugin, so that you can roll back to it later if the new version has a problem. Thus, WordShell collects a complete backup history of your site’s plugins. If you want this history to be truly complete, you should only use WordShell to install and update plugins on your  website and no other tool (including the WordPress web admin console).

You can also choose other versions to update to rather than the latest,  exactly as with installing. See the manual page for installing for details. e.g. install a specific version:

wordshell mysite akismet --new=2.5.5

If you are trying to isntall a version that is older (or equal) to the present version, then you will need to add –donotrequirenew to the command-line; otherwise WordShell will assume you made a mistake and abort:

wordshell mysite akismet --new=2.5.4 --donotrequirenew

Update from a particular zip file:

wordshell mysite myplugin --new=path/to/myplugin-1.0.1.zip

Update all plugins on a particular site:

wordshell mysite all --latest

Update all active plugins in a particular site:

wordshell mysite all --latest --active

Working with modified versions

If you have made customisations to your plugins, then WordShell will detect them, and ask you what to do. See the relevant manual page for more information. Note that sometimes plugin authors release updates to plugins without changing the version number. This can happen for example if they merely corrected something small, like a spelling mistake. WordShell works with its own local cache of downloaded plugins, and once it has downloaded a plugin once it will not do so again. If the plugin author makes a change, then WordShell may detect this as a modified version, and so you should see the relevant manual page.

Advanced usage and tips

  • As with installation, you can view changelogs and descriptions, and require an extra confirmation before proceeding. See the manual page for installing for details. Example command: wordshell mysite akismet –update –latest –changelog –confirm. The order of the switches does not matter; the previous example could also be written: wordshell mysite akismet –confirm –changelog –latest –update without making any difference.
  • As with installation, you can add –activate to also make the plugin active (if it was not already). Alternatively you can deactivate with –deactivate. If you specify –activate then you will also need to specify –update explicitly on the command line (otherwise WordShell will assume that you only wanted to activate the plugin, and not also to update it).
  • –upgrade is a synonym for –update, so you do not have to remember which to use.
  • –dryrun is also available, to inform you what would have happened (but not actually change anything)
  • As with installation, you do not need to manually enter or leave maintenance mode: this is done for you. (In fact if you manually enter maintenance mode first, then WordShell will assume that other work is being done on the site and will wait for maintenance state to be cleared).
  • –ignorenamechange will prevent WordShell from asking you to confirm that everything is OK if a plugin changes its name upon update. (It normally asks you, in case something unexpected is happening – e.g. you have a 3rd party plugin that has the same slug as a new and different plugin that has just appeared in the WordPress.Org repository).
  • –fast will operate only on sites which WordShell already knows the plugin is installed on (using its internal cache). This will mean that any sites that have been updated through the WordPress dashboard to install the plugin since you last used WordPress will be omitted; but it will mean that things go quicker if you’ve got lots of sites that haven’t been cached recently. Example: “wordshell all contact-form-7 –latest –fast”.

Next read:

Leave a Reply

Site Map