How To Restore Deleted Post Or Page In WordPress (Step By Step Guide)
Worried that you won’t be able to restore deleted pages or posts on the WordPress site? Don’t panic, there are many ways to recover your lost content.
WordPress has a built-in feature called Trash to recover deleted pages and posts, however, it only works with recently deleted items. If you’re trying to recover older items or permanently deleted ones, you need to explore other options.
In this guide, we cover how to recover recently deleted pages and posts in WordPress. But we also go beyond this and guide you through ways in which you can restore permanently deleted pages or posts in WordPress.
TL;DR: The easiest way to recover deleted content on your website is to restore your backup. If you don’t have one, we strongly recommend that you backup your WordPress site immediately. When things go wrong and pages are accidentally deleted, you can restore your backup in one-click and your deleted content will be restored in under a few minutes.
How To Restore Deleted Pages or Posts from the Trash in WordPress
We’re only human and we all make mistakes. We’ve all been there where we accidentally delete a post and realize the mistake immediately. But the important thing is not to panic. Follow our instructions on how to restore deleted pages or posts in WordPress and you’ll be fine.
If you have just deleted a post or a page and want to undo your action immediately, WordPress gives you an option to Undo.
Simply click on this button and your post or page will be restored.
If you’ve deleted a post or page and a few hours or days have gone by, you’ll need to follow a different route to restore it.
When you delete a page or post, it isn’t wiped out from your website immediately. WordPress sends it to a folder called Trash. Any page or post you delete will stay inside the trash folder for 30 days.
So you can recover deleted pages or posts from the trash in WordPress easily, but you have to do it within 30 days.
Here are the steps for restoring a deleted page from trash:
- Log into your WordPress admin panel and go to Pages or Posts (Depending on which one you want to restore).
- Click on Trash and you’ll be redirected to all your deleted pages and posts.
- Select the page you want to restore, and two options will appear under it – Restore and Delete Permanently.
- Select Restore and the page will disappear from the list of items in the Trash folder. Go back to Pages or Posts, it will appear here.
Your page or post is now restored to normal.
Note: If you don’t see the Trash option on your dashboard, it means there are no deleted pages or posts stored on your site. Or, it has been more than 30 days since you deleted it or you’ve chosen to permanently delete those pages. Restoring deleted pages or posts in WordPress will not be possible using this option.
How To Restore Permanently Deleted Pages Or Posts In WordPress
You may find yourself in a situation where your pages or posts have been permanently deleted and aren’t in the Trash folder. Some of the common situations that lead to this are:
- A user selects the posts and chooses to ‘Delete Permanently’.
- A user deletes the main administrator account which leads to the deletion of pages or posts created under the admin username.
- Hackers access your site and delete pages or posts.
- A random glitch during an update or modification on your website causes a few posts to disappear. This is rare but it does happen.
If you find yourself in these situations, there is no way to recover permanently deleted pages or posts from the WP admin panel. You can try a few other methods to get your pages or posts back:
- Restore Deleted Pages or Post from backup in WordPress
- Check Your Database
- Retrieve Content From Google’s Cache
Without further ado, let’s dive in.
1. Recover Deleted Pages or Posts from Backup in WordPress
The easiest way to recover deleted pages or blog posts in WordPress is to restore your website’s backup. If you’ve used a backup service like BlogVault, you can easily restore your backup with a few clicks. If you haven’t taken a backup copy with a backup plugin like BlogVault, you can try contacting your web host or using cPanel.
We’ll show you how to restore your backup using three methods:
A) Using a plugin
B) Using your Web Host
C) Using Softaculous
Important: Before you restore your backup, you need to test the backup copy to ensure it has all the content you want. This includes the deleted posts and pages as well as the new ones you’ve recently added to your site. If you revert to an old backup copy, chances are you’ll lose the more recent updates to your site.
If you’re using BlogVault, you can use the in-built test restore function. If you aren’t, we recommend taking a full backup of your website in its present state before you proceed to restore your backup copy.
A. Restore Your Backup Using A Plugin (BlogVault)
Step 1: Visit the BlogVault dashboard. Go to Backups and select Test Restore. Select which backup copy you want to restore and proceed.
Step 2: Visit the Test Restore Site created and check if your pages and posts are recovered. Make sure you haven’t lost any recent data.
Step 3: Go back to Backups and select Restore. Choose the same backup copy you tested and restore your site.
This will only take a few minutes and your deleted pages and posts will be restored on your WordPress website.
B. Restore Your Backup With Your Web Host
Request your web hosting provider for a backup copy. They may be able to provide you with a backup copy that you will have to restore manually using the Backup Wizard on cPanel.
If you opt for this route, you can follow our guide on using cPanel’s Backup Wizard.
C. Restore Your Backup Using Softaculous
Check if your host provides the app installer Softaculous. If your WordPress site was installed using Softaculous, they may have maintained backup copies if the option was selected during installation.
Go to your web hosting account > cPanel. Here, look for Softaculous.
Open it and check if you have backups here. If you do, select it and click on Restore.
The problem with this method is that you won’t be able to test your backup copy to make sure it’s the right one. You would need to download the copy. Then use a staging site and restore the backup copy there to test it out.
2. Check Your Database For Deleted Pages And Posts
Using this method, you won’t be able to recover your deleted pages and posts in WordPress, however, you can retrieve their content. You can then use the content to create a new page or post.
This method requires some amount of technical expertise as you need to go into your WordPress database to fetch the content.
We caution you to first take a full backup of your WordPress site. Ensure you’ve backed up your files and database, then we can proceed.
Step 1: Log into your web hosting account. Go to cPanel > phpMyAdmin.
Step 2: In the left column, you’ll see database names. Click on your database to expand its contents. Alternatively, you can click on Databases on the right panel at the top of the screen, and select your database.
If you don’t know your database name, go to cPanel > File Manager > public_html. Here, download your wp-config.php. Open this file with any text editor like Notepad. You’ll find your database name in this file.
Step 3: A list of tables will load. Locate wp_posts.
Step 4: Once you click on it, it will redirect you to another page that contains all your content – pages and posts included.
You can click on Edit to open and view your file. The content will be in HTML format and not plain text. You can copy this content and create a new page or post.
3. Restore Deleted Pages And Posts From Google’s Cache in WordPress
Search engines usually keep a cached version of your website in internet archives. If you had published your posts and pages and it was indexed by Google, you can try to find it using Google’s cache.
Step 1: Go to www.google.com.
Step 2: Search for the URL of the page or post you are trying to recover. You can also try using the following command: site:www.example.com/name_of_the_old_post. Replace “example” with your website’s name.
Step 3: If you see your page in the results, click on the arrow pointing down next to your URL. You will get two options – Cached and Similar.
Step 4: Google will display the page as it appeared on a particular data. If this contains the content of your page before you deleted it, you can copy it and recreate the page.
PRO TIP: An alternative to Google’s cache is the Wayback Machine. It takes snapshots of your site every now and then. You can try to retrieve your content from here as well.
That brings us to an end on how to restore deleted pages or posts in WordPress successfully.
Retrieving old content or deleted content doesn’t have to be a hassle. It can easily be done in just a few clicks if you take regular backups with a best WordPress Backup Plugin such as BlogVault or just backup your site manually.
Your website will automatically be backed up and the copies will be stored safely. When you want to restore deleted pages or posts in WordPress, you can select the backup copy by date and test it out to make sure it has the content you want. Once you’re sure of it, you can restore your site in a few clicks!
You won’t have to worry about lost pages or posts as well as any other data on your WordPress site.
Save Your Website Data With BlogVault’s Backup Solution!
Melinda is a WordPress enthusiast, and enjoys sharing their experience with fellow enthusiasts. On the MalCare blog, Melinda distils the wisdom gained from building plugins to solve security issues that admins face.