Oh No! all of the blog posts and contents are deleted accidentally! Now, what to do? There are two options – you can either freak out or retrieve all of the lost contents from the WordPress database.
If you want to restore the “lost” web page contents, I can show you two easy steps to accomplish this job:
Check the revision date
This is probably the easiest step to retrieve the lost posts or contents. Open the WordPress edit page of the desired content or blog post. Scroll down towards the end and you will find a list of page revision. You just have to click on the revision date. It will take you to the last version of the page. Here you will find a whole bunch of restore dates. Click on the desired and bring back the early contents.
From the Database
2.1 Use Plugins
Restoring database can also help you to recover the deleted or modified data. But, how are you gonna do this? First, you can use plugins / MySql interface or retrieve the database manually. BackUpWordPress is the plugin appropriate for this job. You can also use the BackupBuddy plugin, which is actively protecting half a million WordPress sites since 2010. The use of plugin is similar to the free data recovery software. You can also use popular free plugins like Jetpack, Duplicator, UpdraftPlus WordPress Backup, and BackWPup.
Restoring the WordPress database manually is a little-complicated job. But, if you have a fair knowledge of MySQL and coding, then the process would be much easier. Here, check this out:
Step 1: Stay logged out from WordPress. It is important to stay logged out while doing restoration, because if WordPress recognizes anything out of order, it may attempt to recreate the content database.
Step 2: Never forget to take your Database backup. You can use phpMyAdmin for manual backup or any plugins to do the same job. If you are using the plugin, download the –main backup archive. You will find SQL within the archives, which includes the post, pages, and WordPress settings.
Step 3: Prepare your database. Before restoring the database, you may need to clean up the old contents. With the MySQL Admin tool it is easy to clear the old contents. Open your PhpMyAdmin and click the ‘databases.’ Then you will find all of the WordPress tables are listed. Before restoring the database, you have to remove all of the existing tables. Click on the “check all” option and “drop” from the pull-down. You will be asked to execute the query. Click “yes” to clear those files.
Step 4: Import the database. You can import your database using phpMyAdmin easily. Just click on the “import” button. Then select the “choose file” button and pick up the desired SQL file that you want to import. Check the options as “default” and select the “Go” button.
Step 5: Merge the SQL files. If you have a small database combine the SQL in single file and then the task should be accomplished from a command line or a text editor. While importing the file you may find that your file size is too big and phpMyAdmin has a file size limitation.
Step 6: Don’t forget to validate the restores WordPress. The last step this process is to ensure that the backup database has restored properly. Select the “structure” link on the page and you will find the listed files.
When you are importing a database and restoring the website, it is common to face some restoration troubles. Here is the list of issues with a possible solution-
It is always recommended to download a fresh copy of the WordPress theme that was installed earlier. It is found that a direct change in the theme files can delete all the changes done before. You may need to go through the theme option to restore the theme set up as it was done before.
Widgets are luckily stored in the WordPress database. Hence, when you are importing your database, switching to the old theme, if not all, most of the widgets will be restored automatically.
In order to rearrange widgets on the website sidebars, you need to go to Appearance>Widgets. However, if you have some plugins installed that comes with widgets, you need to reinstall and activate those plugins again to get those widgets back.
WordPress database keeps a record of the website’s active plugins. Login to your new WordPress site and visit the plugin page and you will find a list of plugins that were installed earlier but not anymore.
Find the plugins that you need to keep from the list and start reinstalling one by one.
Like many other things, the permalink structure of the website is stored in the database. Hence when you are importing the database, the website’s permalink structure will be restored automatically.
However, if the website frontend is showing a 404 error then you need to refresh the permalink settings. In order to refresh the URL structure of your current website, go to Setting > Permalinks, and without changing anything, click the “save changes” button.
Recovering the lost images for your website is going to be the trickiest part of the whole process. It is not only difficult but also a time-consuming process depending on how much content and images were uploaded on the website. Although experts will suggest you handful of tools to extract images from various sources, it is hard to ensure that 100% images will be restored. Here are the two easiest ways that you can try:
6. Hunt the Browser Caches:
If losing the website is a very recent incident, then you may find the images stored in your browser cache. How?
Firefox users may find one or two browser extensions that can help to find images stored in the browser cache and extract them. However, you may need to download the images manually by right-clicking on the image and saving them locally.
Google Chrome users may also find one or two browse extensions similar to Firefox; however, they are only for Windows users. If you are using Mac, Google Chrome is unable to provide any reasonable solution.
7. Hunt the Web Cache
Look for web caches, which is a simple but effective process. You can start with the Google image search by placing your site’s URL in the search bar. You will find images stacked in the search result. Just click on the image, get the larger view, and start downloading!
Also, you can visit Archive.org, which is a nonprofit organization storing website snaps from time to time.
The use of the plugin to recover WordPress is a very efficient process. However, this using plugin is quite easy. If you are familiar with the recycle bin recovery process, then you will find the process easy. On the other hand, the manual database recovery process is a little complicated but certainly useful.