How to Undo Changes in WordPress – Revisions and Backups

When editing WordPress posts, mistakes can happen. Fortunately, you can undo them using WordPress revisions, a built-in feature that lets you revert changes made to your posts.

This article will explore how to undo changes on your WordPress site. With revisions, you don’t need to worry about losing previous versions of your WordPress posts in case you want to restore them in the future.

Download WordPress Security Checklist

How to Undo Changes in WordPress Using Revisions

You can access the Revisions feature from the Gutenberg block editor and the classic editor. Whenever a user clicks Publish, Update, or Save Draft for a post, WordPress creates a new revision.

In addition, the WordPress text editor also has an autosave feature. But keep in mind that revisions and autosaves work differently.

WordPress automatically saves the current version of a post every 10 seconds in the block editor and every 60 seconds in the classic editor. But unlike revisions, WordPress stores one autosave at a time only. Therefore, each new autosave will replace the previous one.

Fortunately, you can easily see and restore previously saved revisions. However, note that your post must have at least two older revisions before the Revisions button can appear.

Note that not every user type can fully utilize revisions. The ability to view the revision history and publish revisions will depend on the user privileges:

  • Editors and administrators – can publish revisions for any post on the website.
  • Authors – can publish their own revisions.
  • Contributors – can submit revisions to their own posts but can’t publish them.

1. Open Revisions Interface

Find the post you want to undo in the WordPress content editor. Then, access Revisions under the Page or Post tab on the settings panel.

The revisions menu in WordPress Gutenberg Block Editor

2. View Previous Revisions of Your Post

The slider at the top of the revisions interface lets you choose which revision of the post you want to see.

WordPress revisions interface

Under the slider, you will see two columns in the revisions screen. The left one is the latest revision of your post, and the right one is the earlier version.

Newly added content is highlighted in green, while the deleted part is red. You can also view who made the changes and when.

Comparing versions in WordPress revisions

Note that the default WordPress editor setting shows sequential revisions. In other words, WordPress will show you the selected revision and the next or previous one side by side.

To compare revisions in non-sequential order, click Compare Any Two Revisions and use the slider tool to find other revisions you want.

Compare any two revisions menu on WordPress revisions

3. Restore the Revision You Want

To restore a previous version, drag the slider to the intended point and click Restore This Revision. This will replace the existing block editor content with the chosen post revision.

But if you only want to restore a small part of a previous revision, just copy it from the Revisions page and paste it into the post editor screen.

Restore this revision menu on WordPress revisions

WordPress Post Revisions Limitations and Removal

Although the revisions tool has predefined settings, you can customize and manage them to your preference. For example, you can limit and disable the revisions feature.

We highly recommend regularly managing your post revisions. Storing too many post revisions will take up enormous space in your WordPress database, potentially slowing down your site.

With that in mind, we’ll explain how to limit WordPress post revisions and disable it entirely if you don’t find it necessary.

Limit Revisions

To avoid having to delete post revisions often, limit the number of revisions allowed on your site.

To do this, edit a code snippet in the wp-config.php file. To access the file, use an FTP client like FileZilla or the Hostinger File Manager. Usually, you can find the file in the public_html folder.

Follow these steps to limit revisions using the wp-config.php file:

  1. Open your wp-config.php file.
  2. Enter the following code to limit post revisions. The number specifies the maximum revisions stored for each post. For example, let’s limit them to just three.

define(‘WP_POST_REVISIONS’, 3);

  1. Save the file.

Pro Tip

Change the number to any number you want as the maximum number of revisions allowed.

You can also limit the number of revisions on your WordPress website with the WP Revisions Control plugin:

  1. From the WordPress dashboard, install the WP Revisions Control plugin.
  2. Go to Settings -> Writing.
  3. Under WP Revisions Control, specify the number of revisions for each post type.
The WP Revisions Control plugin settings

Disable Revisions

Since the revisions tool is automatically enabled, you must turn it off yourself if necessary.

To disable revisions manually, open wp-config.php and change the value from true to false:

define(‘WP_POST_REVISIONS’, false);

Don’t forget to Save the file.

Alternatively, use the WP Revisions Control plugin to disable revisions altogether. To do this, go to the plugin’s settings and set all values to 0.

The WP Revisions Control plugin settings

Click Save Changes to finalize disabling revisions.

How to Undo Changes in WordPress by Restoring a Backup

Sometimes, the revisions tool may not work as intended. If you use Hostinger, you can restore a WordPress backup using hPanel as a last resort. Follow these steps:

  1. Log in to your hosting control panel and click Hosting.
  2. Find your domain name and click Manage.
Manage hosting menu on hPanel.
  1. Scroll down to Files -> Backups.
Backups menu on hPanel
  1. Under Files backups, click on the Select button. From the drop-down menu, choose the date you want to restore. Click Next step.
File backups menu on hPanel
  1. Select specific files or the full public_html folder to restore the entire site.
Menu to restore or download the backup files on hPanel
  1. Click the Restore files button or download them by clicking Download all files.

Conclusion

Undoing mistakes made on your WordPress site is easy. Using the WordPress revisions feature, you can view older versions of your posts, revert the changes, and restore them. This feature improves workflow, especially when multiple authors work on the same post.

If the revisions tool doesn’t work as intended, you can restore a backup of your website to undo previous changes from Hostinger’s hPanel.Don’t hesitate to leave a comment below if you still have questions about how to undo changes in WordPress. And to further improve your site, explore more of our WordPress tutorials.

Author
The author

Mulan P.

Mulan is a Digital Marketing enthusiast experienced in creating social media content. She is eager to help people learn in the simplest way possible. During her free time, Mulan likes to cook and watch sci-fi or documentaries.