0

So, I've taken over management of a Wordpress site that hasn't been maintained very well. We currently have approximately 12,000+ spam comments on various posts. The default UI isn't very helpful at only being able to delete or unapprove 25 or so at a time. Is there a way to do this via SQL?

2
  • 1
    Do you want to delete all comments or only specific ones (e.g. marked as spam)?
    – kero
    Commented Jan 31, 2022 at 13:02
  • absolutely all of them, they're all spam
    – nizz0k
    Commented Jan 31, 2022 at 13:02

1 Answer 1

1

Just run the following commands in your database

DELETE FROM wp_commentmeta;
DELETE FROM wp_comments;

If you changed the db prefix, the name might be foo_comments / foo_commentmeta or similar.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.