Have you ever had a plugin or theme update break your WordPress site?
It doesn’t tend to happen often, but it has happened to me on occasion. Perhaps a new feature that the author has implemented is incompatible with your particular WordPress setup, or an updated plugin just doesn’t play nice with another plugin on your site.
What can you do? Ideally, restore a backup and go back to an earlier version. But if you didn’t take one before updating, what then?
Introducing WP Rollback
Newly released is a WordPress plugin, WP Rollback, which is designed to provide a simple way to roll back changes to plugins or themes to earlier versions stored in the WordPress.org repository.
Yes, I said WordPress.org repository, so this doesn’t apply to premium themes or plugins. 🙂
It comes with the caveat that you should back up your site before making any changes, and preferably test things out on a development or staging site before updating your live site.
So I looked for a backup plugin and I discovered the UpdraftPlus plugin, which is free and allows you to take a backup of your site and restore it at the click of a button. It’s worth checking out if you don’t already have another backup tool.
With my backup in place, I went to try WP Rollback with both another plugin and a theme.
How does WP Rollback work for themes?
To rollback a theme installation, select the active theme on your site by hovering over it where it says Theme Details. I’m using Flat Bootstrap.
Then click on the Rollback button on the bottom right.
Then select the theme version on the list to roll back to, and click the Rollback button.
You’ll get an “Are you sure?” dialog warning you that you might break something, and a disclaimer saying that the plugin developer is not responsible for any misadventures that may result. To continue, click the Rollback button.
How does WP Rollback work for plugins?
I installed the Quick Featured Images plugin, which allows you to bulk add and replace featured images for posts, and even pages. You can also use it to set a default featured image for future posts.
Version 11.0 is the latest version – here is an overview of the plugin’s features:
I added a number of featured images to posts on my site, but selected an option only to add them to posts without featured images:
I then went to roll back the plugin to an earlier version.
For plugins, WP Rollback adds a link next to other links in the plugin menu titled Rollback.
As before, you’ll get a similar selection of older versions to choose from – I’ve curtailed the list. You’ll also get the same warning dialog after you’ve selected your version.
You then have to activate the plugin once the original version is removed and the version you chose installed.
After the rollback to version 7.0, you can see some differences in the user interface as it’s an older version:
The option to only add featured images to posts without them is also gone – the earlier version overwrites all existing ones:
How many versions can you roll back to?
It all depends on what’s in the repository. I tried to roll back to an earlier version of the Multi Image Metabox plugin (current version 1.3.5), but found that the developer only had left one earlier version available (1.3.2, which bizarrely enough is not listed in the changelog.) Very strange!
Roll versions forward
With both themes and plugins, you have the option to roll versions forward as well. Just go through the same process, but select a higher version number.
Update notices for themes and plugins rolled back
Of course, if you revert to an earlier versions of a plugin or theme, WordPress will immediately prompt you to update to the latest version.
How to get round this?
One way is to edit the plugin and set the version number to a very high number. This is not recommended if you are uncomfortable or unfamiliar with editing plugins.
Another way is to use another plugin…
Manage your updates with Easy Updates Manager
Easy Updates Manager can be used to block WordPress core, theme and plugin updates on a global basis, or selectively.
Once it’s installed, choose the Configure option.
Scroll to Automatic Updates. For plugin and theme updates, select the Configure individually option.
Then in the Plugins tab, select the Disallow Updates option for the plugin you reverted. You will then not be bothered by update notifications for that plugin.
You can disallow updates for themes too, in the Themes tab.
I don’t recommend that you turn off Core updates under any circumstances.
Remember to use this plugin wisely! Disabling updates is best regarded as a short-term fix – plugins and themes should normally always be kept up to date for performance and security reasons.
The ideal would be to contact the plugin or theme developer through the WordPress.org support forums, let him or her know of any issues you found and wait for a new version which solves the problem. When it’s available, remember to turn back on updates for that plugin or theme.
If you just can’t manage without a plugin or theme which seems to be no longer actively maintained, you should consider switching to a different one with similar functionality. Don’t try this on a live site!
- WP Rollback enables non-developers to make a quick fix to a site after a update goes wrong, by reverting back to an earlier version of a theme or plugin.
- It should be used with caution – testing on a dev site is recommended, and you are ultimately responsible if you break your site.
- Best practice is to always back up before you update your website.
- If required, you can use Easy Updates Manager to manage your update notifications.
- If in doubt, contact a trained professional.