WordPress revisions: What are they and how to they work?

Because WordPress is so packed with features, sometimes some of them fail to get the attention they deserve. One of the less-publicized features in WordPress is that it stores a revision history for every post and page. This means every time you click the Save Draft or Update button, WordPress creates a copy that you can restore later on. Here’s how to make use of this handy feature.

Revision implementation depends on which editor you’re using

Revisions are implemented differently in different versions of WordPress, depending on the editor you’re using. How can you tell which one you’re using? Use these three questions to find out:

  • Do you have WordPress 5.0 or newer installed? If so, you’re likely using the WordPress visual editor known as Gutenberg (with one exception listed below). If you are unsure which version of WordPress you are using, you are most likely using a version newer than 5.0, as it was released in 2018.
  • Do you have the Classic Editor plugin installed on WordPress 5.0 or newer? If so, you’re using the Classic editor.
  • Are you using a version of WordPress 4 or earlier? If so, you’re using the Classic editor unless you have the Gutenberg plugin installed. (Note: Older versions of WordPress are unsupported and vulnerable to attacks. You should upgrade your WordPress installation to the current version and use the Classic Editor plugin if you prefer the older editor.)

How to use revisions in WordPress

Gutenberg displays revision history in the right sidebar under the document tab.

WordPress 5.0 and above displays revision history in the right sidebar under the document tab.

In the visual editor, revisions are displayed in the right sidebar. Click the Document tab and you’ll see a clock icon with the number of revisions listed next to it.

If you’re using the classic editor, you’ll see revisions displayed revisions in two places. You can see a similar icon with the number of revisions on the right side of the screen in the Publish meta box, and revisions also have their own meta box at the bottom of the editor screen. Scroll down below the main editor box and you’ll see a closed tab that says Revisions. Click on it to open it and you’ll see the list of revisions for the post or page you’re editing.

When you click on the Revisions box, a revisions browser will allow you to scroll through previous revisions of a page. Note that this browser only displays plain text, so any code (including Gutenberg code) is written out instead of processed. Use the scroll slider near the top of the screen to change revisions, and you’ll notice that any information that is different is highlighted.

To restore a prior revision, simply click the “Restore this Revision” box, and the previous revision will be restored as the active one. Save your changes and your previous revision will be displayed on your live site.

Revisions are handy for several reasons. First, if you (or someone else) made a mistake on your site, you can easily revert to a previous version before the changes and save yourself from doing a lot of extra work to restore that post or page to its condition before the mistake was made. Second, if multiple people have editing capabilities on your site, you can see the changes each person made to a given post or page. Finally, you can restore your content in the rare event that someone with editing capabilities on your site posts something negative or unwanted.

Comments