Ready to get started?Download WordPress


Bulk comment deletion? (5 posts)

  1. Boz2006
    Posted 4 years ago #

    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+.


  2. Shane G
    Posted 4 years ago #


    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.

  3. Boz2006
    Posted 4 years ago #

    Shane, many thanks.

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


  4. S.K
    Posted 4 years ago #

    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.


  5. MichaelH
    Posted 4 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic