How to Recover Deleted Pages or Posts & Restore Them in WordPress?

Did you accidentally delete an important page or post on your WordPress site and don’t know how to recover or restore it? Then, no need to worry as it happens with almost every WordPress user. Learn how to recover deleted pager or post & restore them in this post. Often while customizing website layout or archiving older pages, it is possible to delete important pages. And WordPress also understands this very well. Therefore, there are numerous ways to recover and restore deleted pages or posts to users.

How to Recover Deleted Pages or Posts & Restore Them?

Similar to your computer, WordPress also moves deleted components to the Trash folder. Here the deleted components will not appear on your site or admin side, but they will stay in the Trash folder for 30 days.

WordPress doesn’t permanently delete items from your database immediately. It keeps the deleted files in the database for a month just in case you want to restore them. However, it is also possible if you want to restore posts or pages after they are removed from the Trash folder. It just requires a little technical knowledge.

Whether you have accidentally deleted pages or posts in WordPress, just follow these methods to restore them.

Restore Deleted Pages or Posts from Trash

This is the simplest method to recover or restore your deleted page or post on WordPress. But there’s a catch. The deleted content stays just for 30 days in your trash.

Simply navigate to Pages > All Pages on your WordPress dashboard. Next, click on the Trash tab, and all the items deleted within the last 30 days will appear on your screen.

restore deleted post in wordpress from trash

Scroll down to the page or post title that you want to recover and click on the Restore option next to it.

You can also select multiple pages or posts at once and then select the Restore option from the Bulk Action dropdown. This way, you can recover multiple pages or posts with one click.

Now, you can go to Pages > All Pages and navigate the restored pages there.

Restore Deleted Pages or Posts Using a Backup Plugin

If you want to restore pages or posts after 30 days, you can use WordPress backup plugins for that. WordPress backup plugin will help you recover your hacked WordPress site and entire website’s deleted content easily.

Some best premium WordPress plugins also help you to make other changes on your site as you can restore settings any time if things went south.

There are numerous different WordPress backup plugins available that you can install as per your preferences, such as:

Restore Deleted Pages or Posts Using the cPanel

If you don’t have a WordPress backup plugin on your site, you can still restore your deleted pages or posts from cPanel, which requires technical expertise. So, if you are a beginner WordPress user, this method isn’t recommended for you.

Before tweaking cPanel, make sure to backup your WordPress site to be extra careful, and then you can proceed as:

  • Log into your web hosting account > cPanel > phpMyAdmin.
  • Look for the database name of the page or post you want to restore. If you don’t know the database name, go to cPanel > File Manager > public_html and download your wp-config.php. Open the file in the text editor, and you’ll find your database name.
  • Once the list of tables loads, look for wp_posts.
wordpress cpanel look
  • This will redirect you to a page containing all your content. Just click on the Edit to open and view your pages. The HTML format content will appear on your site, just copy it and create a new page. It’ll help you restore and recover any deleted page or post in your WordPress website.
Restore Deleted Pages or Posts Using the cPanel

Restore Deleted Pages or Posts Using Google’s Cache

If you have deleted published posts or pages, Google has probably already indexed them. So, you can restore your content from Google’s Cache as follows:

  • Open www.google.com on your computer.
  • Search for the page’s URL you are trying to restore. Or, you can follow this command, just replace “example” with your website’s name:

site:www.example.com/name_of_the_old_post

  • If you find your page in the results, click on the arrow pointing down to your URL, and you’ll get two options — Cached and Similar.
locate google cache
  • Google will show pages as they appeared on a particular data. If there you find your page before you deleted it, just copy it to recreate the page.
Restore Deleted Pages or Posts Using Google's Cache

Restore Deleted WooCommerce Pages

WooCommerce creates some default pages like checkout, shop, cart, etc. All these pages are essential to run your WooCommerce store properly.

However, if you have accidentally deleted a default WooCommerce page, first go to the Trash folder (refer to method 1).

If you can’t find pages in the trash, you have to create new ones. Simply go to Pages > All Pages and click on the blank page title, let’s say Cart.

add new page on wordpress

In the same way, you can create other pages like cart, checkout, or account.

add cart page on wodpress woocommerce

Once you have created new pages, tell WooCommerce to use the new pages. For this, go to WooCommerce > Settings > the Advanced tab.

advanced woocommerce settings in wordpress

From here, select the new pages you have created under the Page Setup section. You need to click on the Product tab to restore the shop page and then select the new Shop Page.

Once you are done setting new pages, don’t forget to save your settings.

Restore Deleted Pages or Posts from your Web Host

If none of the above-mentioned methods have worked for you, request your web hosting provider for a backup copy. They can provide you with a backup copy that you have to manually restore using the Backup Wizard on cPanel (refer to method 3).

Conclusion

There you go, people! Now, you can quickly restore and recover pages or posts on your WordPress site. That means you don’t have to worry when you accidentally or intentionally delete any pages or posts on WordPress. You can simply head over to the Trash bin and retrieve your deleted files within 30 days.

However, if you want to restore your pages after 30 days, using Google cache or cPanel you can do that. Unfortunately, if nothing works, make a request to your hosting provider and they will definitely help you. Overall, you have plenty of ways to restore your deleted pages so don’t hesitate to tweak with your WordPress UX.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.