How to repair a crashed / corrupt WordPress MySQL Database?

This post was published in 2010 under my old website. After receiving requests from the readers, I have decided to re-publish the post.

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 browsed 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 such unwanted situation.

Feel free to contact me or Whizz People (my startup) for WordPress-related issues.

Leave a Reply

Your email address will not be published. Required fields are marked *