In this article, we’ll show you how to undo WordPress changes using a core feature called revisions.
WordPress has two neat facilities for 'saving your bacon data' called Autosave and Revisions. These are basically snapshots in time of your post or page content to make it easy to roll back changes when needed (or restore your previous content).
Autosave
By default, before you save a draft or publish a page or post, WordPress saves a copy of the content every 60 seconds when you're editing (this saved copy is overwritten every 60 seconds – there can only ever be one autosave for each user).
This autosave function helps you avoid losing your content in the event of a browser crash, or lost connection.
To restore an Autosave, you'll usually see a notice telling you that "a more recent version" is available when you reload the editor. This typically happens after a computer, browser or internet failure or if you got logged out and come back later. You can also access autosaves using the revision interface (explained below) and autosaves are labelled Autosave with red text.
Revisions
Every time a post or page is saved as a draft, published or updated, WordPress saves a copy of how it looked at that exact moment as a revision.
If you go ahead and make additional changes to your content and then re-save it, another revision will be created. You'll end up having a lot of revisions that can be returned to when required.
You can go back to any revision to view it or restore it as the current version anytime you wish.
Each revision is tracked to each user that made the changes and when so this can be helpful for keeping track of who’s doing what with your content.
Revisions should show on the sidebar for each post and page. If you don't see a revisions section, it means either
a) there's only been one save of this content (e.g. there's no other previous version) or
b) you don't have permissions to access the revisions.
How to Undo in WordPress Using Revisions
Step 1: Open Revisions Interface
To access the revisions feature, look for the Revisions link (see above image) in the sidebar of the WordPress editor (usually on the right hand sidebar).
Step 2: Choose Revision To Restore
Step 3: Restore Revisions
There are two different ways how to undo in WordPress and restore a revision:
- Full restore
- Manually restore just a part using copy and paste
1) First, you can use the Restore This Revision button to restore the currently selected revision (it might also say Restore This Autosave, depending on whether you’re looking at a revision or an autosave).
It’s important to note that this button is all or nothing. That is, WordPress will completely replace the current content with the content in the revision:
By low-tech, we mean simply going in and copying the content you want to restore. Then, you can go back into the editor of your current content, and paste the lost part! You can copy and paste just the parts that you want as much as you wish, from any revision. It's a bit "fiddly" but it does work.
Can You “Undo an Undo”?
If you change your mind after restoring an older version of your content – don’t worry. You can always go back into the same revisions interface and restore again.
When you use the Restore This Revision button, WordPress doesn’t delete the other revisions.
Instead, it just creates a brand new revision with the content that you’ve restored.