Hi All, You might have noticed that my blog was down due to database error some days before. In this post, I would like to share How I recovered all my deleted pages, posts and comments without having a backup file.
What happened was that I just deleted my wordpress database accidentally. Suddenly it is gone. Though images, themes, plugins and other data getting saved in Hosting file management, WordPress usually store all the settings, posts, comments data in WordPress database in a server.
Usually We need to take a backup of whole website using backup or backup-wizard given in the cpanel, which will have .sql file if unzipped. With that file we may use import section of ‘PhpMyAdmin’ and run it for backing up the deleted database.
But in my case i have lost that backup folder also.
But in luck, Every week I usually submit my website to Google for indexing. Like the same before I have submitted my sitemap to Google last week.
Thank God! Google had the cached copy of my entire wordpress site.
How To Recover
I have created another database for wp in ‘PhpMyAdmin’, and assigned a user with ‘password’. Then In File Management of cpanel, I have opened ‘wp-config.php’ under wordpress installation folder.
Then I checked for the lines similar to below.
define('DB_NAME', '*****'); /** MySQL database username */ define('DB_USER', '******'); /** MySQL database password */ define('DB_PASSWORD', '******');
Then I replaced Database name near DB_NAME within quotes, Database Username near DB_USER within quotes, Database Password near DB_PASSWORD within quotes.
I just typed ‘site:http://bizgolive.com/blog/’
I got all the indexed pages listed down in Google.
I just clicked the down arrow under listed link, It showed “Cached copy”. Clicked it.
Wow! All the post data is there. I just copied down my entire post, set up that specific date and “published”. Now new post data is entered into database.
Similarly For comments, every-time I will receive Notification from each visitor who comment on my post. I just checked out those comments and set specific date in database too for comments in ‘wp_comments’ table.
This way I have recovered my deleted wordpress database one by one without having backup file. Hope this will help you if you face the same problem just like me. Kindly leave a comment what problems and all You face and how did you recover your blog or If you need any help I will try to help you, Thanks!