WordPress is unlike real life, where we don’t get the chance to roll back time and correct our mistakes. Well, provided proper precautions were taken. This means you’ll no longer feel your heart sink after saving a post or page or making a site-wide change you know wreaks havoc. Even if you do, it only lasts briefly, since you’ll quickly remember reverting your actions takes a few clicks. For many webmasters, this adds a degree of security and confidence in the process of becoming a successful WordPress blogger. So, without further ado, here’s how to undo in WordPress.
1. Undo changes in WordPress via Revisions
Each time you click on Save Draft, Update, or Publish, you create a Revision of a post, page, or custom post type. The same applies to Autosaves, which are Revisions WordPress creates automatically. With that acknowledged, follow these steps to undo in WordPress using Revisions:
- Open the page, post, or custom post type.
- Click the Undo button (backward arrow icon) in the top left corner (Block (Gutenberg) Editor only).
- If that doesn’t work, depending on the WordPress Editor, do this:
- Classic Editor: In the Publish meta box (in the top right corner by default), click on Browse next to “Revisions”.
- Block Editor: In the right sidebar, open the Document tab, then click on Revisions.
- You’ll now see the Compare Revisions of “Post/Page/Post Type Name” page.
- Want to restore to the most recent Revision or Autosave? Click on Restore This Revision or Restore This Autosave.
- If you want to restore any of the previous revisions, you can:
- Click on the Previous button in the top left corner.
- Click on the slider at the top, split into as many sections as there are Revisions/Autosaves.
Things to know
Here are some notable facts about undoing in WordPress:
- Content highlighted in red was deleted in that Revision.
- Content marked in green was added in a Revision.
- An Autosave revision will have its title written in red font.
- By default, you can only compare a current Revision with the Revision that immediately precedes it. To change that, put a checkmark in front of Compare any two revisions.
- Regardless if you’re restoring manual or automatic revision, the change is “all or nothing”. In other words, you can’t restore some parts of a Revision.
- You can copy parts of past Revisions and manually paste them into the WordPress Editor. This allows you to prevent unwanted overwriting.
- You can “undo an undo”. If you accidentally restored a Revision, revisit the interface and use the slider at the top.
- By default, WordPress doesn’t limit the number of Revisions. That’s why we taught you to disable post revisions to reduce database size.
- Autosaves are created every 60 seconds in Classic Editor, and every 10 seconds in Block Editor by default. You can limit or disable this via wp-config.php or by installing a WordPress plugin.
2. Undo site-wide changes in WordPress
Obviously, there are many other things you’d want to roll back. Whether that’s possible or not depends on the precautions you took. To clarify, you can revert site-wide WordPress changes like this:
1. Check web hosting snapshots
This isn’t always possible and depends on your web hosting provider and the payment plan you have. For example, Kinsta creates a “snapshot” e.g., a backup of your entire website, every 24 hours. They will store backups for the last 14 to 30 days at any time, depending on the plan you have with them. Kinsta customers can then sign in to their MyKinsta Dashboard, and then:
- Click on Sites in the left sidebar.
- Under Backups, go to Environment Backups. Switch to the Daily tab.
- Find the snapshot (named by the date and time of creation), and click on Restore to.
- From the drop-down menu, select Live.
- Tip. Like WordPress, Kinsta will save a snapshot of the website before restoration. Therefore, you can “undo an undo”.
2. Restore from a backup
If your hosting doesn’t offer snapshot functionality, you can fall back onto whichever backup plugin for WordPress you’re using. Depending on the plugin and the last time you created a backup, roll back to an older version of your website to undo the alterations you made.