Announcing Duplicator WP-CLI Commands (And How They Speed Up Backups)
Announcing Duplicator WP-CLI Commands (And How They Speed Up Backups)
Making changes to your WordPress website is easy. But what happens when you make a change you didn’t mean to?
Accidentally deleting content, breaking your site with a bad plugin, or falling victim to a hack can be incredibly frustrating. But with the right approach, you can undo the damage and revert to a working version of your site.
Ready to become a WordPress “undo” expert? Let’s dive into the different methods for undoing changes in WordPress.
There are several common scenarios where you may need to undo changes made to your WordPress site. Let’s talk about a few of them!
It’s easy to accidentally delete content, change settings you didn’t mean to, or make other unintended edits while working in WordPress. Rather than trying to recreate the previous state, it’s sometimes faster to just undo the change.
As a website owner, you might want to test out new plugins, theme settings, page layouts, or other changes. If you do, you’ll need an easy way to roll back your site if you don’t like the results. This way, you can experiment without risk.
Updates are important maintenance tasks for security and functionality. However, they can sometimes cause conflicts or break parts of your site. Being able to undo the update restores your site while you investigate the issue.
If your site gets hacked or infected with malware, you’ll want to restore a clean version of your site. This removes any malicious code and gets you back into your dashboard. You won’t lose your site forever!
No matter the reason, undoing changes in WordPress can save you hours of headaches and troubleshooting time.
I’ll walk you through the easiest ways to undo changes in WordPress!
The most beginner-friendly way to undo changes in WordPress is to restore a complete backup of your site. This allows you to revert every element — content, settings, plugins, themes, and more — back to how it was at the time of the backup.
Regularly backing up your site is crucial for this method to work. I highly recommend using a WordPress backup plugin like Duplicator to easily create backups on a schedule.
Duplicator takes snapshots of your entire site – files, database, plugins, and themes – and packages it into a neat zip file. If you ever need to undo changes, you just restore this backup with a single click.
The restore process is incredibly user-friendly. Simply go to Duplicator » Packages and find a backup that was created before the error. Hit the Restore button next to it.
That’s it! In just a few minutes, Duplicator will overwrite your current site with the backup version. Everything will be restored exactly as it was.
You can do the same with cloud backups. Your data will be moved to local storage, allowing you to restore it.
Remeber, to use this method, you’ll need to create frequent and consistent backups. Other backup options include plugins like UpdraftPlus, hosting control panel backups, or manually backing up your files and database.
If you only need to undo changes to a specific post or page, WordPress has a built-in revision system.
Let’s walk through how to restore a post revision in the Block Editor, or Gutenberg.
In the WordPress editor, click the Revisions option in the sidebar.
This pulls up the Revisions screen. You’ll see a list of all saved revisions for that piece of content. WordPress will show you what you’ve removed or added to the post.
If you want to restore a specific revision, click on Restore This Revision.
This restores the previous version of your post or page! You’ll be automatically redirected to the Block Editor for the original content.
This is a quick way to undo recent content changes without affecting the rest of your site!
WordPress will also automatically save your post even if you don’t hit Save Draft, Publish, or Update. These autosaves will be with the post revisions. You can restore them the same way you restored post revisions.
If you’re still using the Classic Editor for managing WordPress posts and pages, the process for restoring revisions is very similar.
When editing a post or page, you’ll see a number of revisions on the right-hand side. Hit Browse to see the different versions.
Like with the Block Editor, use the slider to view all of your revisions. You’ll see a split screen showing the differences between the current draft and that revision. Added content will be in green and removed content will be in red.
Once you find the version you like, hit Restore This Revision.
That revision will become the new draft state for the post or page. You’ll be redirected to the Classic Editor screen.
As with the Block Editor revisions, this only applies to the content body itself, not any other site settings or configurations. It’s just for undoing content editing changes on that specific post or page.
If you have a WordPress.com site instead of self-hosted WordPress, the process for undoing changes is a bit different. WordPress.com has some unique backup and revision capabilities.
For posts and pages, the revision system works the same as the self-hosted block editor. You can browse previous revisions and restore content to an earlier state.
In the WordPress.com post editor, find Revisions.
In the pop-up, you’ll see all of your changes. To use a specific version, hit Load.
WordPress.com also has a way to restore accidentally deleted posts. Go to Posts » Trashed. Locate the right one and select Restore.
You can also use plugins like Jetpack to restore your entire site.
You might also need to roll back other features on your site, like your contact form. If you accidentally delete important fields or break the entire form, you can undo these changes.
WPForms is a contact form with a built-in revisions feature. Every time you save a form, it’ll back up your new changes. Then, you can view the revision history and restore an old version if you need to.
In the form editor, click on the button in the bottom left corner.
Here, you’ll see previews of all the earlier versions of the form. Select an old version before the error and click on Restore this version.
This way, you don’t have to fully recreate forms from scratch after unintended edits.
Yes, you can undo a WordPress update. All you’ll need to do is find a backup that was created before the update. If you’re using a backup plugin like Duplicator, it’ll tell you the WordPress version for each backup.
Once you find the right backup, restore it! This instantly replaces the current version of WordPress with the older version.
To undo changes made when editing a specific WordPress page, you have two options:
The revisions method is quicker for just undoing text changes. But restoring a backup ensures you revert any other settings changed at the same time.
WordPress has a revisions feature that keeps track of changes made to posts, pages, custom post types, and other content. You can also use plugins like Melapress File Monitor to track when files, plugins, themes, and other site components are edited.
If you need an audit of every single change on your WordPress dashboard, WP Activity Log records and displays all user activity across your site.
Post and page revisions in WordPress are stored in the wp_posts and wp_postmeta tables in your WordPress database. The wp_posts table contains the full text content for each new revision created. Metadata about those revisions is stored in wp_postmeta.
To limit WordPress post revisions, you’ll need to open your site’s public_html directory in an FTP client or cPanel. Open the wp-config.php file and add the following code:
define(‘WP_POST_REVISIONS’, 5);
Feel free to change ‘5’ to the number of post revisions you’re allowing on your site.
After you save changes to your wp-config.php file, you won’t have to deal with a disorganized post revisions interface. Old revisions will be deleted after they exceed your custom limit.
Having the ability to undo changes in WordPress can be a real lifesaver. From restoring backups to reverting post revisions, you now have multiple methods for quickly recovering your site.
While you’re here, I think you’ll like these extra WordPress tutorials:
Do you want to quickly undo any change in WordPress? Use Duplicator Pro to roll back your site in one click!
Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. We only recommend products that we believe will add value to our readers.