Remove corrupt WordPress comments with phpMyAdmin

Getting comments from visitors to your blog is a great feeling but aside from the problem of comment spam you may also find on rare occassions that a comment gets corrupted or mangled when it is posted.  In this situation you may also find that you can’t moderate the comment via the WordPress admin dashboard to remove it.

corruptcomment

Fortunately you can also remove comments directly from the WordPress database using phpMyAdmin.  Most web hosts provide access to phpMyAdmin via their hosting control panel so that customers can manage their own databases.

When you launch phpMyAdmin you should see your WordPress database listed (in my case here “wordpress26″.

phpmyadmin01

Click on your database name on the left and it will display the tables for that database.  Click the “Browse” icon next to the wp_comments table.

phpmyadmin02

Find the corrupt comment in the list.

phpmyadmin03

Once you have located the comment click the red X to delete it.

phpmyadmin04

If you found this post useful please leave a comment below. To receive new blog posts automatically subscribe for free to the mailing list or RSS feed.

Leave a Comment

{ 1 comment… read it below or add one }

Jane November 13, 2009 at 9:42 am

Helpful but not complete. I have done this but now there is some corrupt comment on there that I cannot find. I moved some comments to a new page and all is well. But still don’t know where the corrupt comment is.

Now I have something new corrupt and even after repairing the database in MySQL when I go to the post, the page is blank (just the background color shows).

All was well, then I added a title tag there, and the page went blank. Deleted the title tab but the page is still blank (just colored background).

Don’t know how to repair this one!

Reply