Did you know that WordPress comes with a built-in feature that allows you to undo changes and go back to a previous version of a post? This feature is called Post Revisions or simply Revisions.
Even we make mistakes when writing blog posts. Sometimes, you might wish that you hadn’t deleted what you wrote earlier. Revisions allow you to fix that by going back in time and undoing the changes.
In this article, we will show you how to easily undo changes in WordPress with post revisions.
Note: This article covers how to undo changes on WordPress posts. If you’re looking to undo WordPress updates, then see our guide on how to rollback WordPress.
What Are Post Revisions?
WordPress comes with a powerful system to store revision history for each post or page you are writing.
For each draft you are working on, WordPress automatically saves a temporary revision. This type of revision is called auto-save.
WordPress stores an auto-save every 60 seconds. It also automatically replaces the older version with the new auto-save.
The autosave feature helps you restore content if something goes wrong before you can save it. For example, if your browser crashed or your computer froze while writing, then you can restore your latest draft from the autosave.
WordPress also saves post revisions each time a user clicks on the save, update, or publish button. Unlike auto-saves, these revisions are permanently stored in the WordPress database.
You can locate, browse, and revert back to any of these revisions from the post edit screen.
Useful workflow features like these are what make WordPress the most popular blogging platform on the planet.
That being said, let’s take a look at how to use post revisions feature to undo changes in WordPress posts and pages.
Why You Should Use Post Revisions
Almost every WordPress user can benefit from post revisions. Writing great content requires a lot of tweaking and edits. Post revisions allow you to see your process and take a bird’s eye view of how your post has evolved.
You can then switch between different states of your draft, make changes, and make your article perfect for publishing.
For multi-author WordPress sites, post revisions allow editors to easily manage the work of multiple authors. You can see who made changes to an article, what changes they made, and so on.
That being said, let’s take a look at how to use post revisions to improve your WordPress posts and pages.
Video Tutorial
If you’d prefer written instructions, just keep reading.
How to use Post Revisions to Undo Changes in WordPress
WordPress displays the number of revisions under the ‘Post’ panel on the post/page edit screen in the WordPress block editor.
You can find that on the right-hand side of your post editor screen. Clicking on the ‘Revisions’ tab will take you to the post revisions screen.
The post revision screen shows the latest revision of the post, with a scrollbar on top.
Sliding the button on the scrollbar will take you to earlier revisions of the post.
Changes made in each revision will be highlighted in green and pink. At the top, you can see the user who made these changes, the time, and other information.
WordPress will also let you know if a revision is an autosave or a draft.
You can use the next and previous buttons to move around revisions.
Plus, you can check the box on top that says ‘Compare any two revisions’. Doing so will split the scrollbar button into two, and you can take each button to a different revision and compare the difference between two distant revisions.
To restore a revision, you can simply click on the ‘Restore This Revision’ or ‘Restore This Autosave’ button.
WordPress will restore the selected revision as your current post revision, and you can then save it as a draft.
Keep in my mind that restoring to an earlier revision will not delete the latest version of your post. Instead, WordPress will store it in the database as another revision.
Using Post Revisions with Old WordPress Editor
If you haven’t upgraded your WordPress to Gutenberg and are still using the old Classic Editor, you’ll find the post revisions in the Publish meta box on the right panel of the post/page edit screen.
To view the post revisions, you can simply click the ‘Browse’ link next to the number of revisions. Apart from this, the post revisions work similarly in both the Classic Editor and Gutenberg.
Limiting or Deleting Post Revisions in WordPress
All post revisions are stored in your WordPress database. Many users worry that too many revisions can slow down their websites.
This is not true.
WordPress skips post revisions when making database calls on the front end. It only looks for revisions on the post edit screen or when you are actually browsing revisions.
WordPress allows you to control how many revisions you want to keep for an article. To limit post revisions, simply add this code to your WordPress site’s wp-config.php file:
define( 'WP_POST_REVISIONS', 10 );
Don’t forget to replace 10 with the number of revisions you want to keep for each post.
You can also delete old post revisions. If you are sure that you’ll never need those revisions, then here is how you can delete them.
First, make a new WordPress backup of your site. This will allow you to restore your website if something goes wrong.
Next, you need to install and activate the WP-Optimize plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.
Upon activation, go to the WP-Optimize » Database page and check the box next to ‘Clean all post revisions’ option.
Now click on the ‘Run optimization’ button to delete all post revisions. After you have deleted the revisions, you can uninstall the plugin.
Note: Deleting revisions will not stop WordPress from saving revisions for your future posts.
We hope that this article helped you understand how to use post revisions to undo changes in WordPress. You may also want to see our guide on how to auto-schedule your WordPress blog posts or our expert picks of the best Gutenberg-friendly WordPress themes.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Jiří Vaněk
Regarding revisions, I’m unclear about one thing. You mentioned that revisions don’t slow down the website. However, I’ve encountered several sites with hundreds of published articles and a large number of stored revisions. This meant that there were more than 10,000 revisions (sometimes more) in the database. Not only did it fill up the database, but the website actually started to slow down and experience errors, possibly due to the overloaded database. After using the Sweep plugin to delete the revisions, the site significantly sped up and stopped generating errors. So, it seems that if there are too many revisions, they can fill up the database and cause the site to slow down or generate errors when the database runs out of space. Wouldn’t it be better to regularly monitor the number of revisions and keep them at a reasonable level?
WPBeginner Support
It would depend on the size of the site, if the server is running out of space due to the revisions then there is a good chance that the site is large enough that you may need to consider a new hosting provider as that could mean that soon you may run into the error again with new posts in general. For the short term you could look to remove and limit revisions but in the long term we would recommend taking a look at our article below!
https://www.wpbeginner.com/beginners-guide/when-should-you-change-your-wordpress-web-hosting-top-7-key-indicators/
Admin
Jiří Vaněk
Thank you for the link to the article. I’ve always seen revisions as more of a boogeyman than a helper, so I got into the habit of regularly deleting them. However, during my work, I’ve come across websites with around 20,000 revisions, and there I noticed some slowdowns. I’ll definitely read the article because it’s good to know when you might hit the limits of your hosting.
Madeleine Eames
What if it says that revision was removed?
WPBeginner Support
If your site says that the revision was removed then the revision may have been deleted which would prevent you from using it.
Admin
Mona
What if my first developers did not have revisions turned on. Then I got a new developer, I messed up my site then had revisions turned on. Will they still work to revert back to the date before they were turned on?
WPBeginner Support
If revisions were disabled, you would not have revisions from before it was active.
Admin
Sunil
Thank you so much, very informative, I accidentally removed all my content and updated the site but I followed your steps, and yes it’s again back…
WPBeginner Support
Glad our guide was able to help
Admin
Reggie
Thanks so much for this. I accidentally overwrote a post when I thought I was working in a clone of it. I felt so sick, but this saved me!
WPBeginner Support
Glad our guide was helpful
Admin
Milosh
I’ve just applied a ton of changes and saved, and accidentally pressed wrong key where all my changes were rolled back. THIS SAVED MY DAY! Thanks a lot!
WPBeginner Support
Glad our guide was able to help
Admin
marybeth
Thank you so much. This plugin saved me hours.
WPBeginner Support
Glad our recommendation could help
Admin
Mark Hallowell
When I click on the 26 revisions, it takes me to the Compare Revisions of “page”, but it is completely blank. Any ideas how I can see my revisions?
WPBeginner Support
We do not have a specific reason for that issue at the moment, for a starting point we would recommend going through our troubleshooting guide below:
https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/
Admin
Terri Zwierzynski
I’m not finding the Revisions section when editing a page.
I see the Status and Visibility block on the right (Visibility, Publish Date, Author, Move to Trash) and then the Permalink block. No list of revisions anywhere…did something change in WordPress 5.5??
WPBeginner Support
You would want to ensure the post has saved versions of if to revert to. You may have plugins or settings that are limiting or removing the post revisions from your site.
Admin
Chloe Young
Is it possible to take something from a previous revision and bring it to your current one without changing the whole thing?
WPBeginner Support
You could copy the content and paste it into the current version, but currently reverting to a revision would take all of the previous version’s differences.
Admin
dd solei
suggestion – it would be great if you could include a screenshot of “WHERE” to go to get to ‘Revisions’ I used it before, but can’t remember how to get back to it. I was hoping your article would help me, but unfortunately it’s useless to me because I have no idea where “the ‘Document’ panel on the post/page edit screen” is. There is a tab for Pages and a tab for Posts. Where is post/page edit screen??
WPBeginner Support
When you edit a specific page or post with the block editor you should see the document editing on the right-hand side of the page
Admin
Chris Feddersen
Good day,
I am a complete beginner. I work for a small business, which had an existing website. I was trying to change the look of the website, and lost the original website and all it’s content by saving and publishing to the new theme. Is there any way I can restore the original website?
WPBeginner Support
Yes, you can connect to your website using an FTP client. Go to /wp-content/themes/ folder and download all files and folders inside it to your computer as a backup. After that delete all theme folders (using FTP) except the one that last worked on your site.
Admin
nabhdeep
Undo revision for front page??? Please help.
Vicki O'Dell
Is this something that has been discontinued? It does not exist in the current version that I have. I just lost a good 1,000 word post and I don’t even know how it happened. I’m so bummed.
Philip
I restored a older version by using Revisions. Is there any way to undo that and go back to the newest version again?
WPBeginner Support
Yes your new version is also stored as a revision.
Admin
Graeme
I cam to this page seeking help in undoing revisions to themes and other changes. This page is helpful in affirming that posts or pages can have be “revision-ed” but that is not what I need.
How do I undo other kinds of saved changes?
mannat kaur
I need to know how to undo the changes made on home page?????// please help me at earliest
Salvador
Is there a way to undo publish in general?
I was in the themes section, clicked ‘customize’ and by mistake clicked on ‘save & publish’… the page wasnt even close to finished so the original website is gone and I’m stuck with a website with no content yet.. help!
Charlie Sasser
I always knew this was there but never really used. Thanks for bring this up.
What is the impact and performance hit on the database? Is there a build in way or a good plugin that will selectively flush the old versions for the database?
WPBeginner Support
impact on database is not that significant unless you have many authors working on multiple posts at any given time. You can easily delete old post revisions.
Admin
Ralph Ferro Jr., Esq
This is a very practical and great instructional article – wish you had more of these which is geared for the novice. e.g. when doing testimonials – it is cutting off and not allowing two pages – how can this be fixed?
how do you change your menu to have a button look using an object to insert in your page descriptions rather than plain test.
this was written well and very easy to follow – some are written for programmers…