How to fix a corrupted WordPress comments table
I logged into my WordPress admin panel and saw these ominous warnings:
'./your_wordpress_database/wp_comments' is marked as crashed and should be repaired.
Uh oh. That doesn't seem good. I went to one of my blog posts and it said the same thing. OK no need to panic. I run my own WordPress on a virtual private server and also administer my own MySQL databases.
The solution is remarkably simple:
- Run the mysql client.
mysql -u your_wordpress_user -p
- Switch to your WordPress database.
use your_wordpress_database
- Issue the command
repair table wp_comments
- Previous: RubyNation 2008 wrap up
- Next: 10 Things I Learned from C4[2]