Setup & site building · Guide
How to Undo in WordPress (Step by Step)

Short answer
In the WordPress block editor, press Ctrl+Z on Windows or Cmd+Z on Mac, or click the Undo arrow in the top toolbar. To undo changes you already saved, open Revisions and restore an earlier version. Trashed posts can be restored from the Trash for 30 days by default.
Key takeaways
- Ctrl+Z or Cmd+Z undoes editor changes; add Shift to redo.
- The editor's undo history resets when you reload or close the page.
- Revisions let you undo changes after saving, without losing newer versions.
- Trashed posts and pages can be restored for 30 days by default.
- Plugin updates, deleted media and settings changes need a backup or rollback tool.
How do you undo in WordPress?
In the block editor, press Ctrl+Z on Windows or Cmd+Z on Mac, or click the curved Undo arrow in the top toolbar. Redo with Ctrl+Shift+Z or Cmd+Shift+Z.
That covers changes made since you opened the editor. For changes you already saved, use post revisions to restore an earlier version.
Other undo jobs, such as bringing back a deleted post, reversing a plugin update or resetting a template, each have their own method. This guide covers them all.
How do you undo changes in the block editor?
Use the keyboard shortcut or the Undo button at the top left of the editor, and each press steps back one change, such as typing, moving a block or changing a setting.
The shortcuts are the same ones you use in most apps:
| Action | Windows | Mac |
|---|---|---|
| Undo | Ctrl+Z | Cmd+Z |
| Redo | Ctrl+Shift+Z | Cmd+Shift+Z |
WordPress keeps a list of shortcuts in the editor itself. Open the Options menu with the three dots at the top right and choose Keyboard shortcuts, or read the block editor keyboard shortcuts page.
The undo history lasts only while the editor is open. If you reload the page or close the tab, the history starts fresh.
Undo works on whole actions rather than single letters. Typing a sentence usually counts as one step, so a single press can remove more text than you expect. Press Redo to bring it back if you go too far.
The List View can help here. Open it from the toolbar to see every block on the page, which makes it easier to spot what changed after several undo steps.
Apple's list of Mac keyboard shortcuts is handy if you switch between Windows and Mac and keep mixing up the modifier keys.
Why is the Undo button greyed out?
The button is greyed out when there is nothing left to undo, usually because you just opened or reloaded the editor, or you have already stepped back through every change.
It can also happen when your cursor is inside a text field that handles its own undo, such as a block's sidebar setting. Click back into the content area and try again.
If undo still does nothing, a plugin may be interfering with the editor. Our guide on fixing the block editor when it stops working covers common causes.
How do you undo changes after saving?
Open the post or page, go to the Revisions link in the settings sidebar, pick an earlier version in the revisions screen, and click Restore This Revision.
WordPress saves a revision every time you save or update a post, plus autosaves while you work. That means you can go back even after closing the editor.
Restoring a revision does not delete the newer versions. It creates a new revision with the old content, so you can switch back again if you change your mind.
Revisions store the title, content and excerpt. They do not store featured images, categories, tags or most custom fields, so check those by hand after restoring.
If you cannot see a Revisions link, the post may have only one saved version, or revisions may be turned off in wp-config.php. Your host may also limit how many revisions are kept.
The Revisions documentation on WordPress.org explains the comparison screen and the slider.
How do you undo deleting a block?
Press Ctrl+Z or Cmd+Z right away, or click Undo, and the deleted block comes back in the same place with its content.
If you have already saved, restore an earlier revision instead. Our guide on deleting a block in WordPress also covers getting blocks back.
A useful habit is to duplicate a complex block before heavy edits. Select it, open the block toolbar's options and choose Duplicate, then work on the copy.
How do you undo deleting a post or page?
Go to Posts or Pages, click the Trash link at the top of the list, hover over the item and click Restore, which moves it back to drafts.
WordPress keeps trashed items for 30 days by default, then deletes them permanently. Once they are permanently deleted, only a backup can bring them back.
The trash period is controlled by the EMPTY_TRASH_DAYS constant, which you can change in wp-config.php. The wp-config.php documentation explains this and other constants.
Restored posts return as drafts. Check the content and publish them again when ready. Our guide on deleting a blog post on WordPress covers trash, permanent deletion and redirects.
How do you undo changes in the Site Editor?
In the Site Editor, use the same Undo button and shortcuts while editing, and use the template's Reset or revisions options to go back after saving.
Block themes store your template and style edits in the database. That means you can usually reset a customised template to the theme's original version.
To reset a template:
- Go to Appearance > Editor and open Templates or Patterns.
- Find the template or template part you changed.
- Open its actions menu and choose Reset.
Global styles changes also have their own revisions in recent WordPress versions. Open the Styles panel and look for the revisions option to step back through earlier style changes.
How do you undo a plugin or theme update?
Restore a backup from before the update, or use a rollback plugin such as WP Rollback to install the previous version of the plugin or theme.
WordPress itself can roll back a plugin automatically if an update fails partway through, but it does not offer a button to go back after a successful update.
The WP Rollback plugin lets you pick an earlier version from WordPress.org and reinstall it. Test the result on a staging site first if the plugin is important.
Rolling back can leave database changes from the newer version in place. That is why a full backup is the safest undo for big updates.
How do you undo a theme change?
Go back to Appearance > Themes and activate your previous theme again, then check menus and widgets, because some settings are tied to each theme and may need re-assigning.
Your posts and pages stay untouched when you switch themes. Only the layout, menus, widgets and theme-specific settings change.
Shortcodes from the old theme are an exception. If the theme provided its own shortcodes, they may show as raw text until you switch back or replace them.
Take a backup before switching themes on a live site. That gives you a clean way back if menus, widgets or custom CSS do not return as expected.
If you changed settings in the Customizer, those are saved per theme. Switching back usually brings back the old values.
How do you undo changes in the classic editor?
The classic editor supports Ctrl+Z and Cmd+Z inside the content box too, and post revisions work the same way once you have saved.
The visual editor has its own undo history, separate from the browser's. Switching between the Visual and Text tabs can sometimes clear it, so save often.
If you prefer the old interface, our guide on going back to the classic editor explains your options.
What if you need to undo something bigger?
For deleted media, changed settings, broken updates or a hacked site, restore a full backup, because WordPress has no undo for these actions.
Things WordPress cannot undo on its own:
- Permanently deleted posts, pages and comments.
- Files deleted from the media library.
- Changes to settings screens and plugin options.
- Database changes made by plugins.
This is why regular backups matter. Our guide on restoring a WordPress site from a backup walks through the process with common backup tools.
How can you avoid needing to undo?
Save drafts often, preview before publishing, test big changes on a staging site, and keep automatic daily backups so every mistake has a way back.
A few simple habits help:
- Use Preview to check a post before you hit Update.
- Duplicate important pages before redesigning them.
- Update plugins on a staging copy first for business-critical sites.
- Check your backups actually restore, not just that they run.
Our guide on setting up a staging site shows how to test changes without touching the live site.
The editor's undo stack is handled by the Gutenberg project, which is developed in the open on GitHub. If you find an undo bug, searching its issues often shows whether a fix is coming.
Frequently asked questions
What is the shortcut to undo in WordPress?
Press Ctrl+Z on Windows or Cmd+Z on Mac while editing. To redo, press Ctrl+Shift+Z on Windows or Cmd+Shift+Z on Mac. You can also click the curved arrow buttons at the top left of the block editor.
Can I undo after publishing a post in WordPress?
Yes. Open the post, click Revisions in the settings sidebar, choose the version you want and restore it. Then update the post. Restoring creates a new revision, so you can still move forward again later if needed.
How do I undo a deleted page in WordPress?
Go to Pages, open the Trash view, hover over the page and click Restore. It returns as a draft. If the trash was emptied or the page was deleted permanently, you need to restore it from a backup.
Can I undo a WordPress plugin update?
WordPress has no built-in undo for a successful update. Use a rollback plugin to reinstall an earlier version from WordPress.org, or restore a backup taken before the update. A backup is safer because it also restores any database changes.
Why does undo not work after I reload the editor?
The editor keeps its undo history in your browser only while the page is open. Reloading clears it. To go back further, use revisions, which WordPress stores in the database each time you save or autosave.
Sources
- Keyboard shortcuts in the block editor WordPress.org Documentation
- Revisions WordPress.org Documentation
- Editing wp-config.php WordPress Developer Resources
- WP Rollback WordPress.org Plugins
- Mac keyboard shortcuts Apple Support
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


