How to Undo Changes in WordPress with Post Revisions

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.

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.

Autosave Posts in WordPress

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.

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.

WordPress revisions
How to Undo Changes in WordPress with Post Revisions 1

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.

WordPress Post revision screen

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.

Autosaved Post WordPress

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.

Compare Two revisions WordPress posts

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.

Restore a Revision in WordPress

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.

Browse Post Revisions in WordPress Classic Editor

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:

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.

Clean post revisions

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.

Lượt xem: 13

Để lại một bình luận

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *