How to Recover and Restore Deleted Pages in WordPress

Updated on Dec 19, 2022

Accidents do happen when working with any type of software. If you delete a WordPress page by accident, you should know that it is not difficult to recover it. This guide will show you how to do it quickly and easily.

This post includes:

How WordPress Handles Deleted Pages?

WordPress, like your computer, places deleted items in a Trash folder. This removes the items from your website and administrative screens. However, the items are not permanently deleted. If the items are not deleted within 30 days, WordPress permanently deletes them.

If the deleted page you want to restore is still in the trash, you can restore it. If it was also removed from the trash, you can contact your webhost and ask if they have a backup of your website. You may delete a page by accident and not realize it for a while. Daily backups are provided by FastComet.

How to Recover Deleted Pages from Trash in WordPress

This method is the easiest, and you should try it first before doing anything else.

Normally, when you delete an item in WordPress, it is sent to the trash folder, and you can recover it for the next 30 days. After that, it will be automatically deleted forever.

  • Go to Pages → All Pages inside your WordPress admin area. From here, you need to switch to the ‘Trash’ tab to view all the pages that have been deleted during the last 30 days.

Access WordPress Pages Trash

  • If the page(s) you want to recover is listed there, then simply take your mouse over the page title, and you’ll see the option to ‘Restore’ it.
  • You can also restore multiple pages at once by selecting them and then choosing ‘Restore’ from the Bulk Actions drop-down menu at the top.

Bulk Restoring Pages in WordPress

  • Now go to Pages → All Pages and locate the restored page there.

What if the page you deleted is not listed under Trash?

How to Restore Deleted Pages in WordPress Using a Backup Plugin

Backups are among the most effective WordPress security and productivity tools. WordPress backup plugins must be installed on all WordPress websites.

These WordPress backup plugins can help you recover not only a hacked WordPress site but also deleted content, such as pages.

Note

WordPress backup plugins allow you to restore your entire website to an earlier point. This means any other changes you made to your website after that time can be lost.

If you remember when you deleted a page, you can use the most recent backup to restore your website.

If you don't have a WordPress backup plugin installed, there's a good chance your hosting provider does, and you can still restore it through cPanel. You have daily backups if you use FastComet.

How to Recover Deleted WooCommerce Pages

By default, WooCommerce creates pages for the checkout, cart, shop, and account management. These are important pages for your WooCommerce store to function properly.

If you accidentally delete a WooCommerce page, then you can first try restoring it by looking into the Trash.

If you cannot find the page in trash, then you can simply create a new one. For instance, you can go to Pages → Add New and then create a blank page titled Cart.

Similarly, you can create other WooCommerce pages as well for shop, checkout, and account.

After you have created new pages, you can tell WooCommerce to use these new pages instead. Go to WooCommerce → Settings page and switch to the Advanced tab.

From here, you can select pages you created earlier under the Page Setup section.

For the shop page, you’ll need to switch to the Products tab and then select the page you want to use as your Shop page.

Don’t forget to click on the Save changes button to store your settings.

How to Restore Selected Pages from a WordPress Backup (Advanced)

This method is complicated, unreliable, and not suitable for beginners. It would be useful, however, if you don't want to restore an entire website and lose any changes made since the backup.

Simply restore your WordPress backup to a local server installation and copy and paste the page contents you want to restore.

  • First, download your WordPress backup files to your computer. Go to your WordPress database backup plugin page and you see Recent Backups.
  • To download the database backup to your computer, click on it.
  • Back up your WordPress website to a local server. WAMP can be used to install WordPress on your computer (or MAMP for Mac).
  • Install your WordPress backup plugin on the local server installation and use the backup files to perform a restore. If you only have the database backup, you can restore it with phpMyAdmin as well.
  • Update your WordPress Site and Home URLs in the database. To do that, open phpMyAdmin on your local server.
  • Select your WordPress database from the left column and then click on the wp_options table. Switch to the browse tab and locate the rows containing ‘siteurl’ and ‘home’ under the option_name column.
  • You will notice that the option_value column contains the URL of your live website. You need to edit both of these rows and replace your option_value to match your local server WordPress site.
  • Click on the ‘Go’ button to save your changes.
  • You can now login to your localhost installation, and you’ll see all your old pages listed under Pages → All Pages.
  • Edit the page you want to restore. All you need to do is copy the content and paste it to your live WordPress website as a new page.
  • Don’t forget to update or publish changes on your live website.

Conclusion

As this article demonstrates, even if you delete a WordPress post by mistake, not all is lost. Backups are always recommended to all of our clients for a reason. Even if you don't have one and need one, you can always contact our technical support team to see if it's not too late to take advantage of FastComet's free daily backups.

We hope you find this article useful. Discover more about FastCloud - the top-rated Hosting Solutions for personal and small business websites in four consecutive years by the HostAdvice Community!

WordPress Hosting

  • Free WordPress Installation
  • 24/7 WordPress Support
  • Free Domain Transfer
  • Hack-free Protection
  • Fast SSD Storage
  • Free WordPress Transfer
  • Free CloudFlare CDN
  • Immediate Activation
View More