Today morning I got an email from my client that his wordpress blog is no more. I quickly ran into his blog and shocked ! There is no posts or pages in the blog. When I logged in to the wordpress dashboard, I saw the same. There is zero posts, zero pages...
I really wondered what happened there. Then I logged into the phpMyAdmin and check the database. when I clicked 'wp_posts' table, it shows the following error.
"#145 - Table './DB_NAME/wp_posts' is marked as crashed and should be repaired"
I googled for the #145 error and found there is a fix for it. We can repair the crashed table.
I had explained it below with necessary screenshots.
1. Login to your phpMyAdmin and select the wordpress database.
2. Then select the checkbox of wp_posts tabel.
2. Then in the bottom dropdown list select "Repair Table".
3. Done. You will get the success message.
Now check the blog again. You will shock again that the blog posts and all other pages are back !! :)
Alternatively you can fix this error my executing the SQL query:
REPAIR TABLE `wp_posts`
Well, the database tables should not crash by themselves. Problems are usually of a misconfiguration mysql server. Anyway you can fix this error easily.
Comment back if this post helps you.