How to Undo Changes in WordPress with Post Revisions
If you write frequently then you must have been stuck in a situation where you wish you could undo an action that you performed. Well, there’s a built-in feature for that known as the Post Revisions. It’s just like a time machine which takes you back in time and let you correct your mistakes.
Don’t know how to use this extremely useful feature? No need to worry, we have got you covered.
Getting to know Post Revisions
Before learning how to use this feature we should try to learn what is this feature. While writing posts on WordPress you should have noticed that it autosaves your progress. While this autosave process it also saves a temporary revision history.
And the revisions are saved permanently in the WordPress database when you publish or save the post. This helps you to undo any of the actions that you performed earlier.
Now that you have understood that what this feature let’s dive into how to use it.
How to use this extremely useful feature?
You can easily spot the number of revisions on the Document panel while editing a post. To get to the post revisions screen click on this.
This screen will show you all of your post revisions ordered from latest to oldest along with other details like date and time of the revision and who made this revision. And the green and pink colors indicate changes made in the revisions.
Another very useful feature is the “Compare any two revisions” feature. This allows you to split the scrollbar into two which can be used to compare two revisions simultaneously by placing both the scrollbar buttons at different positions. To activate this feature you need the check the box next to “Compare any two revisions”.
Once you find a revision to restore you have to click on it and then click on the “Restore this revision” button.
Some people may not have updated to the Gutenberg Editor. In case you are still using the classical editor, you will find the revisions option in the publish box that is present on the right. There you will see a”Browse” option next to the total number of revisions. Rest of the steps remain the same as the Gutenberg editor.
How to limit and delete post revisions?
Some of you here might be worrying about the amount of space the post revisions are going to occupy and that might slow down your site. That’s nothing to worry about because it doesn’t work this way. The thing is that WordPress looks for the revisions only when you are browsing through then and skips them while making database calls on the front end.
You are also free to set a limit to the number of revisions per article. If you wish to do so you just need to browse your website’s wp-config.php file and then put the following code into it.
|define( ‘WP_POST_REVISIONS’, n );|
In the code above ‘n’ is the number of revisions for each post. Change it as per your choice.
This will save your site from getting extra post revisions. But what about those that you already have and do not need? Before deleting the revisions that you do not need any more we suggest that you make a new backup for your website so that you can restore it if in any case, something goes wrong.
Once you have created a new backup you need to go to the plugins section and install and activate the “WP-Optimize” plugin. Once it is successfully activated you need to go to WP-Optimize and then click on Database. Then check the box next to “Clean all post revisions” and click the “Run optimization” button. This will delete all the post revision from your website.
We hope you found it super easy to use the post revisions feature and you won’t panic when you accidentally perform an action the next time in the editor window that you wish you hadn’t. These simple steps can save you from a great deal of trouble.
- Check out our recommendations for the best wordpress web hosting.