All WordPress Posts Deleted

I was editing a post on Indian Recipes blog and when I clicked on update button all posts disappeared. This was a shock as I have never seen such kind of problem before in WordPress.

At first I thought that blog might have been infected with some malware as it is very common in WordPess blog. But a quick logical thinking ruled out malware.

I didn’t update any plugin so it was not a plugin issue as well.

The next logical step was to check the wp_posts table from phpMyAdmin which I did. And that is where I found the cause of this problem.

WordPress wp_posts table crashed
WordPress wp_posts table crashed

wp_posts table was marked as crashed.

So here it was, the problem was with wp_posts table, it was crashed for some reason and needed a repair.

Sigh of relief, in worst case I had to recover database from the backedup file.

If you click on wp_posts from the left pane you will see the error shown in above image.

How to repair wp_posts table

Repair wp_posts table
Repair wp_posts table

In phpMyAdmin click on the database name, tick the checkbox before wp_posts table, scroll down and select Repair Table.

This will repair table and you will see no error now.


Comments

One response to “All WordPress Posts Deleted”

  1. You saved my life, I almost had heart attack when I saw all my post disappeared. I even didn’t backup before this happened.

Leave a Reply

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