Support » Fixing WordPress » Bulk comment deletion?

  • I need to delete 3,000+ junk comments in a neglected WP installation.

    Is there a simple way of doing this? I can see how the bulk deletion works, but it’s time-consuming to go through 3,000+.


Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    Please execute this query to remove all spam comments from wordpress database:

    delete from wp_comments where comment_approved = ’spam’;

    This query is assuming that database is configured as default.

    Shane G.

    Shane, many thanks.

    Please excuse my lack of knowledge, but how / where do I execute this?


    If all those comments are already flagged as spam you have a button “Delete All Spam” on the edit-comment -> spam screen.

    Otherwise there are 2 alternatives:

    !. Use the query given by Shane G on the sql box of PhpMyAdmin.
    2. If you do not know how to access your database or you do not want to touch it, use the “screen options” tab on the edit comments screen of admin and increase the number of comments shown per page. It will make your life easier a bit!

    Hope this helps.


    And don’t forget Backing_Up_Your_Database before doing any database ‘stuff’ like that with phpMyAdmin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Bulk comment deletion?’ is closed to new replies.