How to repair a crashed/corrupt WordPress MySQL Database?

  • Sharebar

This morning I had a panic attack. I was checking my WordPress blogs and found one of my blog has no post, totally nothing. Can you believe it? I tried to login to my WordPress Dashboard, and I logged in without any hassle. How come my categories, tags, stats, attachments are fine except my posts. I just can’t believe it.

I went to WP-phpMyAdmin under Tools option; this plugin works exactly same as cPanel phpMyAdmin. I was checking each every tables of my WordPress blog. All of them looked fine, I could browse through them. But wp_posts was showing in use message and the browse option was disabled.

I had no idea what to do. With a split second decision, I selected the table (wp_posts) from the list of all tables and then selected Repair table from With selected drop down menu.

The next thing, I could see was a message that said the table was repaired. Then I went back to the list of tables. This time wp_posts table was enabled to browse. I went to blog homepage and I got all my posts back.

Later, I talked to Hostgator customer service about the problem and they said that probably the particular table was crashed due to an error or incomplete WordPress request. And there is nothing much to do to prevent the unwanted situation.

Do you have same WordPress & MySQL related problem? Are you scared to tough your MySQL database? Don’t worry, contact me and let me show how I can help you.

Wish you all the best.

Take care, bye.

By the way, this post was sponsored by WordPress Rockers, a WordPress blog for novice to professional users. Feel free to ask any basic WordPress question and WPRockers team will answer without laughing at you.

{ 13 comments… read them below or add one }

Harsh Agrawal September 1, 2011 at 10:45 pm

Thanks I also faced the issue while updating the site..I used a plugin wpdb manager and repaired my database.. :)

Reply

Faisal Humayun July 25, 2011 at 4:24 am

Do yourself a favor and find out if you can use AutoMySQLBackup (in your daily cron) on your shared hosting service.

http://sourceforge.net/projects/automysqlbackup/

It will truly be something you will be thankful for having.

Reply

Jinnat Ul Hasan July 27, 2011 at 7:50 pm

Thank you for your suggestion. I am already using a different backup plugin for my sites.

Reply

Faisal Humayun July 27, 2011 at 8:07 pm

Anytime. If you want to use a plugin, I would really suggest you use a combination of http://wordpress.org/extend/plugins/wp-maintenance-mode/ and http://www.mysqldumper.net/
This way, your site will be put into maintenance mode so that no tables are corrupted during the backup process (which can happen if visitors continue to hit your site and update tables in live mode).

Reply

textile today June 22, 2011 at 9:24 pm

is there any way to use wordpress template in blogger ?

Reply

Jinnat Ul Hasan July 2, 2011 at 11:48 pm

Nope, WordPress themes cannot be used in blogger (blogspot) but some of the themes are blogspot versions as well.

Reply

blog foto June 10, 2011 at 4:23 am

wow… that’s scary to lost all of our post in WP.
Never experienced the problem, … recently i just got problem with folder permission…. the pictures won’t showed up.

Thanks for sharing!

Reply

Jinnat Ul Hasan July 2, 2011 at 11:50 pm

I had the same problem in my other blog as well.

Thanks for your comment.

Reply

Sharif Uddin September 10, 2010 at 5:29 am

Thanks Hasan Bhy for your share. I hope it would be very helpful for us though I have not fallen in such situation. But nobody can say what is going on to his sit……Finally thanks again…

Reply

Independent Sazzad September 7, 2010 at 1:42 pm

The site is really cool and attractive. But there are two widget as a same name “Recent Post”. I think one will be “Recent Comment”. Isn’t it?

Reply

Jinnat Ul Hasan September 7, 2010 at 1:49 pm

Thank you Sazzad. Recenly I redesigned my blog and didn’t notice the Widget label.

Reply

Pantho Bihosh September 3, 2010 at 9:34 pm

I was face this problem. But I have been solved this problem to follow your suggestion what you said to Shamim. :D

Thank you.

Reply

Jinnat Ul Hasan September 4, 2010 at 1:24 am

Glad to know that. Wish you all the best.

Reply

Leave a Comment

Previous post:

Next post: