What you are seeing
Most deletions in WordPress can be undone if you act before anything overwrites them. What you can get back depends on what was deleted and where it lived: the database, the files, or a service outside WordPress.
| What you lost | Where to look first |
| A page or post you deleted | Pages or Posts, Trash. WordPress keeps trashed items for 30 days by default, then empties them. |
| Changes you made to a page and want to undo | Revisions in the editor sidebar, or your page builder’s history or revisions panel. |
| A page builder layout replaced by a template or a bad import | The builder’s revisions, then WordPress revisions of the same page. |
| An image or file deleted from the Media Library | Gone from WordPress straight away: media skips the Trash unless the site enables it. You need a backup of wp-content/uploads. |
| A plugin you deleted, and its settings | Often still in the database. Reinstalling the same plugin usually brings the settings back. |
| Menus, widgets or Customizer settings after switching theme | Usually saved under the old theme. Switching back shows them. |
| A user you deleted, and their posts | If you chose to delete their content, it skipped the Trash. A backup is the only way back. |
| The whole site, the database, or the hosting account | Your host’s backups first, then your own. See the no backup guide if there are none. |
| A DNS record or an email mailbox | Not WordPress at all. Ask the DNS or email provider; some keep a recent copy. |
Confirm it in two minutes
1. Look in the Trash.
wp post list --post_type=page,post --post_status=trash --fields=ID,post_type,post_title,post_modified
Run it in an SSH terminal inside the site’s folder (the one that contains wp-config.php). --post_status=trash lists only trashed items; add other post types such as product to the comma list if needed. Good: your item is listed. Restore it from the Trash screen in the dashboard. Since WordPress 5.6, a restored post comes back as a draft, so publish it again afterward.
2. List the revisions of an edited page.
wp post list --post_type=revision --post_parent=PAGE_ID --post_status=inherit --fields=ID,post_date,post_author
Run it in the same terminal. PAGE_ID is the number in the page’s edit link (post.php?post=PAGE_ID). Revisions are stored as children of the page with the status inherit. Good: revisions dated before your change. Restore one from the editor’s Revisions screen, which shows a side-by-side comparison first. No output means revisions were off or the page was never saved twice.
3. Check whether revisions and the Trash are switched on.
wp config get WP_POST_REVISIONS
wp config get EMPTY_TRASH_DAYS
Run these in the same terminal. An error saying the constant is not defined means the defaults apply: unlimited revisions and a 30-day Trash. false or 0 for revisions means none are kept; 0 for the Trash means deletions are permanent at once.
4. Check whether a deleted image’s file still exists.
ls -l wp-content/uploads/YYYY/MM/ | grep -i 'FILE_NAME'
Run it in the same terminal. YYYY and MM are the year and month of the upload, and FILE_NAME is part of the file name. If the file is still there, only the library entry went, and you can add it back with wp media import wp-content/uploads/YYYY/MM/FILE_NAME.jpg, which adds a fresh copy to the Media Library (pages that used the old image need it picked again). If it is gone, restore it from a backup.
5. Find out what backups exist. Look in the hosting panel for daily backups or snapshots and note the dates. Check your backup plugin’s list too. Write down the newest backup taken before the deletion.
Most likely causes, in order
- It is in the Trash. Tell: check 1 lists it. Fix: restore it, then publish it again from draft.
- A revision has the old content. Tell: check 2 lists revisions from before the change. Fix: compare and restore in the Revisions screen.
- The builder’s own history has it. Tell: the page is built with a page builder that keeps its own revisions. Fix: restore from the builder’s history panel, then save.
- A single item can come back from a host backup. Tell: the item is gone from WordPress but backups exist. Fix: restore only the files or table you need, or copy the page out of a restored staging copy, so newer orders and entries survive.
- The settings survived the plugin deletion. Tell: you deleted a plugin and its pages now show raw shortcodes such as
[contact-form-7 id="123"]. Fix: reinstall the plugin; the shortcodes start working again.
- Nothing is left on the server. Tell: no Trash entry, no revisions, no backups. Fix: the no backup guide covers search engine caches, the Wayback Machine and other places copies hide.
What it usually is not
- A reason to restore the whole site. That rolls back every order, comment and edit since the backup. Restore the one thing.
- Lost content, when a page shows shortcodes. The content is still there; the plugin that renders it is missing.
- Safe to keep working while you decide. New uploads and edits can overwrite what you want back, and backups rotate. Pause edits first.
- Stored in the browser. Clearing your browser does not delete pages, and it will not bring them back either.
What to send your host or the relevant provider
- To your host: exactly what was deleted (page title, file path or table), when in UTC, and the newest backup date before that.
- A request to restore only that item, or to restore the backup to a separate staging copy you can copy it from.
- For a deleted account or site: your account details, the domain, and a request to check whether any copy or backup is still kept.
- To your DNS or email provider: the record or mailbox, roughly when it was removed, and whether they keep history.
Which guides to read