WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] I have 1300 pending comments, how can I delete them all? (6 posts)

  1. dwhswebhosting
    Member
    Posted 5 years ago #

    I don't want to mark them as spam or check them, I just want to reset them to scratch. ALso if you can see why I'm getting so much comment spam here Blog off hang that would help. As far as I can see I have to do about 20 st a time.

  2. Shane G
    Member
    Posted 5 years ago #

    Hi,

    You can delete all the spam tickets from the database. For that you just need to run the query on your database table.

    Thanks,

    Shane G.

  3. sallam
    Member
    Posted 4 years ago #

    Can someone please give me the query that I need to run to delete all pending posts? I have over 26000 pending posts that I want to delete in one go.

    And do I run the query from phpmyadmin or is there a built in sql box in wp admin?

    Thanks for any help given.

  4. MichaelH
    Member
    Posted 4 years ago #

    Backup your database first.

    In phpMyAdmin

    DELETE FROM wp_comments WHERE comment_approved = 0
  5. sallam
    Member
    Posted 4 years ago #

    Many thanks MichaelH
    Thanks to you, I've deleted 26596 comments in one click. They also disappeared from the admin pages perfectly.

    Is there a page where useful WP queries like this one are listed?

  6. MichaelH
    Member
    Posted 4 years ago #

    Not that I know of.

Topic Closed

This topic has been closed to new replies.

About this Topic