Earlier today, I realised that strangely my blog didn’t have new spam comments in the last few hours, or maybe an entire day. I checked my blog’s admin panel and see that the total number of comments in my blog is zero. Wait… what??? Zero? I just lost the entire comments of this website.
I was frustrated for few minutes and almost use a backup file from 4 days ago and restore everything. But before I did that, I checked the posts list and see that posts with comments are still indicated as having the last number of comments. This shows that I didn’t accidentally delete all those comments. WordPress’ commentmeta table is still intact, yet something happened to my comments table.
So I logged in to my database using PhpMyAdmin, and found that comments table is marked as crashed and I need to repair it. Before repairing, I decided to do a full backup of the entire database first, both from PhpMyAdmin and from my WordPress admin page. Then I proceed with table repair.
Luckily, the repair process was successful. I got all the comments back. Thankfully I didn’t do any restore from older backup yet. Cleaning up the mess would be a lot of work to do.
In case this happens to you, here are the steps to repair crashed tables through PhpMyAdmin:
1. Don’t panic.
2. Sign in to your PhpMyAdmin account and select the correct database.
3. Create a backup.
4. Click on the table name to find out and make sure which tables are crashed and need repair.
5. After knowing which tables to repair, click on SQL tab.
6. Type repair table tablename; change tablename with the name of your crashed table.
7. Hit Go. Repeat if there are more than 1 table to be repaired.
Leave A Comment