WordPress automatically creates revisions whenever you save a draft or update a post. It ensures that you don’t lose important work, allows you to see the changes that have been made and lets you go back to a previous version if necessary. This feature is especially useful on Strattic if you have accidentally published a change to your live site by mistake.
How To Find Revisions In WordPress
For revisions to appear, you must update an existing article with changes. Once revisions have been saved, WordPress displays a revisions link in the right sidebar when you are editing a post. Click the link to proceed to the revision comparison screen.
(In the above example, we are using the Gutenberg editor; if you are still using the classic editor, the link will look slightly different)
Comparing Saved Revisions
Within the revision comparison screen in WordPress, the old content on the left is highlighted in red and the new content on the right is highlighted in green. Keep in mind that WordPress displays the HTML code for your posts.
The first comparison you’ll see is of the two latest versions. However, any revision can be compared.
-
Simply check the box “Compare any two revisions”
-
Then use the slider to quickly move back and forth between your saved revisions.
How To Restore To An Earlier Revision In WordPress
Restoring a revision means that the current post content will be overwritten with the content from the revision.
To replace your existing post with an old version, follow these steps:
-
Make sure the box “Compare any two revisions” is unchecked
-
Navigate to the revision you want to restore using the slider.
-
On the right, you will see a blue “Restore This Revision” button. Click it.
-
Now, you will be taken back to the post editor screen, save the post to make the change permanent.
-
To update your live static site with your revision, run a Strattic publish (a selective publish is your best option here). That’s it!
How To Enable Revisions On Your Site
Most WordPress websites will have revisions enabled by default, but if your website is missing revisions, you can enable them by editing your wp-config.php
file.
-
Edit your sites configuration file, this will be found is in your site’s root directory:
/wp-config.php
-
Search for:
define( ‘WP_POST_REVISIONS’, FALSE );
-
Replace with:
define( ‘WP_POST_REVISIONS’, TRUE);
-
Add the line above if the search fails to yield results
-
Save your file