WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Is there a way to delete all comments at once? (7 posts)

  1. promethea
    Member
    Posted 4 years ago #

    I have over 1,600 comments that are spam on my site. I have just installed Akismet, so I think that should solve the problem of future spam, but how do I get rid of the 1,600 comments? It seems I can only delete 20 at a time, which means I will have to do it 80 times. Is there anyway to delete the whole 1,600 at one time?

    Please, please tell me there is!

  2. MichaelH
    Member
    Posted 4 years ago #

    Backup your database first. See WordPress Backups.

    The can use phpMyAdmin to execute this SQL

    DELETE FROM wp_comments WHERE comment_approved = 0

    Of course if your comments table is prefixed with wp_ you will need to use the correct table name.

  3. Mark / t31os
    Moderator
    Posted 4 years ago #

    Screen options > Comments per page ...

  4. figaro
    Member
    Posted 4 years ago #

    And, one more visual (video) guide:

    [link moderated]

  5. In Screen Options you can set the screen to show much more than 20 comments at a time.

    Or, you can run this in PHPMyAdmin:

    delete from wp_comments where comment_approved = ’spam’;

    but backup your database before doing so, etc.

  6. arabsteps
    Member
    Posted 4 years ago #

    Thank u Very Much For The Explaining

  7. thecolourmill
    Member
    Posted 3 years ago #

    Thanks, this worked for me too. I was re-building an old blog with over 30,000 spam comments(!) and Askimet kept timing out, but the method above (via phpmyadmin) worked within seconds.

Topic Closed

This topic has been closed to new replies.

About this Topic