Support » Fixing WordPress » I have 1300 pending comments, how can I delete them all?

  • Resolved WebHostPro

    (@dwhswebhosting)


    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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.

    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.

    Backup your database first.

    In phpMyAdmin

    DELETE FROM wp_comments WHERE comment_approved = 0

    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?

    Not that I know of.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘I have 1300 pending comments, how can I delete them all?’ is closed to new replies.