Have you accidentally deleted a whole section from your blog? Or published your post before finishing it?
Trial and error are a normal part of any creative process; the same goes for writing online posts. Or imagine an even worse situation: something goes wrong, and you think what youâve written so far is lost forever and might end up losing traffic from search engines.
Did you know that you can undo changes in WordPress and go back to a previous version of a post?
Fortunately, for those using WordPress, thereâs always the option of returning to a previous version of your posts, regardless of whether youâre using free or premium WordPress themes.
WordPress has a post revisions feature that automatically saves copies of every revision you make to a post or page. If you accidentally delete content or wish to undo changes in WordPress, you can use a revision to restore the content.
In this post, we’ll show how to use the post revisions feature to undo changes in WordPress posts and pages.
Table Of Contents
1 What Are Post Revisions?
WordPress contains an automatic saving feature that enables you to go back and edit a post. In Gutenberg editor, every 10 seconds, whatever you contribute to your post is automatically saved.
Besides making this temporary revision, it also replaces the older version of your post with the new one. You can easily go back and restore your post to any previous revision that has been saved.
Now you might be thinking, will it delete my current revision?
No, it will not delete your current version. Old autosaves are replaced by new auto-saved revisions. A new revision will be stored in your database whenever a user clicks on the save, update, or publish button.
2 Why You Should Use Post Revisions?
This option is great if you want a birdâs eye view of how your post has evolved. You can move between many revisions, track your development, consider your options, and select the version of your post that, in your opinion, is the best of all.
This functionality is handy if your WordPress website has multiple authors. Post revisions give editors the ability to coordinate teams to work on a story or article at the same time. You may find out who edited an article, what changes they made, and so on.
This way, the editor can see exactly which author’s version changes were made. The possibility of seeing the bigger picture can massively contribute to the overall quality of your content.
Here are few other reasons to use post revisions:
- It is a mini-backup system within WordPress. Are you unsure of all the changes made since you last modified a post? You can easily check the revision history to see what has changed.
- The revisions in WordPress also can save you from a messy editor. What if somebody comes in and edits a post and makes it horrible? You can easily jump in and roll back that update with the post revisions system.
- It can also be a great tool for reviewing your writing style. Proofreading is not something we all have the time to do. The revisions in WordPress make it easy to make a side-by-side comparison to ensure all the edits you wanted to put in place are actually in place.
3 How to Use Post Revisions to Undo Changes in WordPress
As an example, let us say you wrote a post. It was a stunning post, but you decided to cut a large section of the post out since it was not needed. A few days later, you revisit this edited version and are not happy with it. How can you undo changes in WordPress?
That’s exactly what our next section is all about! So without further ado, let’s undo changes in WordPress.
3.1 Open Revisions Interface
To undo changes in WordPress, navigate to your post/page editing screen. WordPress displays the number of revisions in the Article panel. You can then access the post revisions screen by clicking on the Revision Edit link.
3.2 Choose Revision to Restore
The slider at the top of the revisions interface allows you to choose which revision of the post you want to view. Sliding the button on the scroll bar will take you to earlier post revisions.
Below the slider, you will see two columns in the revisions screen. The left one is the earlier version of your post, and the right one is the latest revision of your post.
Newly added content is highlighted in green, while the deleted part is red/pink. You can also view who made the changes and when the changes were made.
The WordPress editor’s default configuration sequentially displays revisions.
Click Compare any two revisions and use the slider tool to pick further revisions you want to compare in a non-sequential order. Doing so will split the slider, and you can use the slider tool to compare the difference between the two revisions.
3.3 Restore the Revisions
Drag the slider to the desired position and select the Restore This Revision button to restore to an earlier revision. It might also say Restore This Autosave, depending on whether youâre looking at a revision or an autosave.
WordPress will then completely restore the current content with the content in the revision.
However, you can copy a revision from the Revisions page and paste it manually, as shown below. This is useful if, for example, you erased one paragraph and want it back but don’t want to delete everything else you’ve contributed afterward.
And bingo! Thatâs how you undo changes in WordPress!
4 WordPress Post Revisions Limitations and Removal
While WordPress revisions are certainly a helpful feature regarding how to undo changes in WordPress, the fact that WordPress stores an infinite number of revisions (by default) means that revisions can begin to bloat your database as each revision adds a new row to the database of your WordPress site.
With this in mind, weâll explain how to limit WordPress post revisions and disable it entirely if you donât find it necessary.
4.1 Limit Revisions
To limit the revisions, you’ll have to edit a code snippet in the wp-config.php file. To access the file, use an FTP client like FileZilla or the cPanel of your hosting account. You can find the file in the public_html folder.
Next, open your wp-config.php file and add the following code snippet to limit post revisions. The number specifies the maximum revisions stored for each post. You can change the number with the number of revisions you want to keep for each post. For example, letâs limit them to just three.
define(âWP_POST_REVISIONSâ, 3);
Once you’ve added the code, click on the SAVE button to save the changes you’ve made.
4.2 Disable Revisions
You can also disable old post revisions. To manually disable revisions, open your wp-config.php and look for the following line of code: /* Thatâs all, stop editing! Happy blogging. */
Before the above line, add the following line of code and save the file.
define(âWP_POST_REVISIONSâ, false);
To re-enable revisions, you need to replace the word false with true.
5 Frequently Asked Questions
Why Should You Delete Revisions?
Many revisions might slow down your website and degrade its quality. Revisions take up space in your database. This is especially true for huge sites with hundreds of changes.
What to Do if Revisions Arenât Showing Up?
For the sake of saving server space, some web providers disable revisions. In such a scenario, you’ll need to add a line of code to the wp-config.php file, as discussed in the post.
Is It Possible to “Undo an Undo”?
Don’t worry if you decide to change your mind after restoring an earlier version of your content. Restoring is always an option by returning to the same revisions interface. WordPress does not remove the other revisions when you use the Restore This Revision option. It merely makes a new revision using the content you’ve restored.
6 Conclusion
Making a mistake that needs to be reversed is such a common problem. Thankfully, the WordPress revisions and autosaves feature make it incredibly easy to undo changes in WordPress.
Using post revisions can help you a great deal during your post-creation process. Going back to any saved post version allows you to explore your creativity and experiment with your content.
Did you ever wish to undo changes in WordPress? Have you used the post-revision feature for your site? Let us know by Tweeting @rankmathseo.