Tutorial: How to Mass Delete Comments in WordPress

Did you logged into your WP Dashboard only to find out several hundreds if not thousands of spam comments waiting to be deleted?

If so you can apply a mass delete and save your time and clicks from deleting them one by one using the following 2 guides.

Mass Delete comments using phpMyAdmin

    1. Open your hosting cpanel, then scroll down to Database Tools and select phpMyAdmin
    2. In the new page that opens select your database
    3. Scroll down the page and select table wp_comments
    4. If you want to delete all comments then just right click on wp_comments table and select empty, confirm and you're done.
      If you want to remove NON APPROVED COMMENTS then run the following query:

      DELETE from wp_comments WHERE comment_approved =  '0'

      If you want to remove ALL PENDING COMMENTS then run the following query:

      DELETE from wp_comments WHERE comment_approved =  '0'

      If you want to remove ALL APPROVED COMMENTS then run the following query:

      DELETE from wp_comments WHERE comment_approved =  '1'

      If you want to remove ALL TRASH COMMENTS then run the following query:

      DELETE from wp_comments WHERE comment_approved = 'trash'

      If you want to remove ALL SPAM COMMENTS then run the following query:

      DELETE from wp_comments WHERE comment_approved = 'spam'

In case your db prefix is not the default one(that is wp_) then replace the wp_ prefix I used with yours.

Mass Delete WordPress Comments using a plugin(or two :D)

Using phpMyAdmin for deleting comments from your WordPress site may be too complicated for some of you so I suggest to take a look on the following WordPress Plugins that will do the job nice and sleazy!

WPCommentCleaner
Delete Pending Comments

As always feel free to comment in case you need help or have a question(or even two)!

Comments (5)

  1. MaAnna Reply

    July 28, 2013 at 12:27 am

    Thanks for these tips. I’m keeping this one in my back pocket. Just had to do it on a site and wish I had known about all the different ways to do it. Will next time.

  2. Adam Cadell Reply

    August 16, 2013 at 4:29 pm

    Went to visit one of my sites today and was greeted with nearly 9000 spam comments – nice – not!

    Had a look at the ‘phpMyAdmin’ section as suggested, but decided not to proceed. I might be able to do a little Photoshop, build websites etc., but as Clint Eastwood once said in one of his films “a man’s got to know his limitations” or put another way, “a man’s got to know when he’s liable to bo*****s things up.”

    That said, although clearly I’m not on Bill Gates top 10 list of world class web technicians – just the bottom 10, I have to say that I really do like one of the plugins you suggested, namely: WP Comment Cleaner, I downloaded it, plonked it on the site (that’s non ‘geek’ speak for an upload) and voilà, (as you can see, I speak French too) I found a REALLY simply plugin that deleted those thousands of comments immediately – so thanks, that saved me a lot of time, it’s probably one of the simplest, most effective plugins I’ve came across, which unlike some others, didn’t take my site down with it. Thanks.

  3. ndeans Reply

    August 24, 2014 at 7:30 pm

    Perfect solution… I was able to remove over 4,000 comments instantly. Thank you!

  4. WP Contact Form Verification Reply

    September 1, 2014 at 1:25 pm

    For non-technical WordPress users: There is a free plugin called WPCommentCleaner which will remove all comments with just 1 click.

Leave a Reply

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