Can I upgrade a plugin to a specific version?

I am testing plugin upgrades on a staging instance before applying them to production. But if there are any delays in this process, I may end up being prompted to upgrade to a newer, untested version on production.

If prompted to upgrade a plugin, how can I choose an intermediary update, rather than the latest?

Topic upgrade updates plugins Wordpress

Category Web


You can also download specific versions from the plugin's SVN.

For example, imagine you wanted a specific version of the Yoast SEO plugin.

The plugin page for Yoast is is:

https://wordpress.org/plugins/`wordpress-seo`/

Note the highlighted section of the URI wordpress-seo

The SVN/Repo URI will be (notice the URI slug includes the highlighted section from above):

https://plugins.svn.wordpress.org/`wordpress-seo`/tags/

The tags folder lists all the versions.


The most straightforward no cli method of easily upgrading / downgrading a plugin to a specific version:

  1. Click on "advanced view" on the right column of the plugin's page under the list of info - it will take you to a url like https://wordpress.org/plugins/<plugin>/advanced/
  2. Find the "previous versions" section at the very bottom, select the version you want from the dropdown and download the zip file
  3. Remove the current version's folder from wp-content/plugins
  4. Extract the zip you just downloaded and copy the folder into wp-content/plugins
  5. Verify on your site at www.yoursite.com/wp-admin/plugins.php that the version you wanted is now listed

That's it.


Using WP-CLI you can specify this as described in the official documentation.

$ wp plugin update <plugin>

Using either of the following arguments

--minor

Only perform updates for minor releases (e.g. from 1.3 to 1.4 instead of 2.0)

--patch

Only perform updates for patch releases (e.g. from 1.3 to 1.3.3 instead of 1.4)

--version=<version>

If set, the plugin will be updated to the specified version.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.