15

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?

3 Answers 3

27

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.

1
3

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.

1
  • Could you give a short code snippet on how to do that? I for example don't know the first thing about SVN, as I have always been using Git
    – kero
    Commented Jan 22, 2018 at 14:18
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.