Are you trying to recover deleted pages in WordPress?
If you've accidentally deleted a WordPress site, you can restore it from the trash.
In this beginner's guide, we are going to show you how to easily recover deleted pages in WordPress and WooCommerce.
How does WordPress handle deleted pages?
Just like your computer, WordPress moves deleted items to a trash. This will remove these items from your website and administration screens, but they will not be permanently deleted immediately.
After 30 days, WordPress will automatically permanently delete the item from the trash and your WordPress database.
If the page you deleted is still in the trash, you can get it back. We'll show you how to do it in a minute.
However, if it has also been deleted from the Recycle Bin, then you need to try other ways to get the deleted page back in WordPress.
Sometimes you can accidentally delete a page and not notice it for a while. For example, if you have multiple pages with the same name and you end up deleting one that you actually needed.
Another common scenario we've seen is users accidentally deleting pages that are required by WooCommerce or their WordPress membership plugin.
Let's take a look at how to easily recover deleted pages in WordPress and WooCommerce. Here is a brief table of contents so you can jump to the section that best suits your needs.
Method 1. Recover deleted pages from Recycle Bin in WordPress
This method is the easiest and you should try it first before doing anything else.
Usually when you delete an item in WordPress it is moved to the trash and you can restore it for the next 30 days. After that, it will automatically be deleted forever.
Just go to Pages »All Pages in your WordPress admin area. From here, you'll need to switch to the Trash tab to see all of the pages that have been deleted in the last 30 days.
If the page (s) you want to restore are listed there, just hover your mouse over the page title and you will see the "Restore" option.
You can also restore multiple pages at a time by selecting them and then choosing Restore from the Bulk Actions drop-down menu at the top.
You can go now Pages »All Pages and find the restored page there.
It was quick and easy, but what if the page you deleted isn't listed in the Trash?
Don't worry, there are other ways to recover deleted pages in WordPress.
Method 2. Recover deleted pages in WordPress using a backup plugin
Backups are one of the best WordPress tools for security and productivity. All WordPress websites need to have a proper WordPress backup plugin set up.
These WordPress backup plugins not only help you restore a hacked WordPress site, but also help you restore deleted content including pages.
Note: WordPress backup plugins allow you to restore your entire website to an earlier point in time. This means that any other changes you made to your website after that time could be lost.
If you know when you deleted a page, you can access the last backup before that time to restore your website.
If you don't have a WordPress backup plugin installed, there's still a good chance your WordPress hosting company is and you can still restore it through cPanel.
For step-by-step instructions, see our guide on restoring WordPress from a backup. It shows how to restore WordPress from a backup using UpdraftPlus, BackupBuddy, phpMyAdmin, cPanel, and more.
Method 3. Recover Deleted WooCommerce Pages
By default, WooCommerce creates pages for cash register, shopping cart, shop and account management. These are important pages that your WooCommerce store will work properly on.
If you accidentally delete a WooCommerce page, the first thing you can try is to restore it by looking in the trash can (see method 1 above).
If you can't find the page in the trash, you can just create a new one. For example, you can go too Pages »Add New and then create a blank page titled "Shopping Cart".
You can also create other WooCommerce pages for shop, checkout and account.
After you've created new pages, you can tell WooCommerce to use those new pages instead. Just go to WooCommerce »Settings Page and switch to the "Advanced" tab.
From here you can select pages that you created earlier in the Page Setup section.
For the shop page, you need to go to the "Products" tab and then select the page that you want to use as the shop page.
Don't forget to click the "Save Changes" button to save your settings.
Method 4.Restore Selected Pages from a WordPress Backup (Advanced)
This method is a little complicated, unreliable, and is not recommended for beginners. However, it is helpful when you don't want to restore an entire website and you want to lose all of the changes you made after taking that backup.
You can simply restore WordPress to a local server installation and then copy and paste the page content you want to restore.
First of all, you need to download your WordPress backup files to your computer. Just go to your WordPress database backup plugin page and you can see the most recent backups.
For example, here you can see how your most recent backups are listed in the UpdraftPlus.
Just click on the database backup to download it to your computer.
Next, you need to restore your WordPress site to a local server. You can install WordPress on your computer using WAMP (or MAMP for Mac).
You can then install your WordPress backup plug-in when installing the local server and restore it using the backup files.
If you only have the database backup, you can optionally restore it with phpMyAdmin.
After restoring the WordPress database, you need to update the WordPress site and home urls in the database. To do this, simply open phpMyAdmin on your local server by entering the following URL:
http: // localhost / phpmyadmin /
After that, you need to select your WordPress database in the left column and then click on the wp_options table. Switch to the "Browse" tab and find the lines with "siteurl" and "home" in the "option_name" column.
You will notice that the option_value column contains the URL of your live website. You'll need to edit these two lines and replace your option_value to match your local server's WordPress site.
Then click the "Go" button to save your changes.
You can now log into your localhost installation and see all your old pages under Pages »All Pages.
Go a head and edit the page you want to restore. All you have to do is copy the content and paste it into your live WordPress website as a new page.
Don't forget to update or post any changes on your live website.
We hope this article has helped you in recovering deleted pages in WordPress. You might also want to read our full WordPress Security Guide to Keeping Your WordPress Site Safe and our list of WordPress Plugins Required for All Websites.
If you enjoyed this article, please subscribe to our YouTube channel for WordPress video tutorials. You can also find us on Twitter and Facebook.