DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

Even if you’re careful when approving new comments, sometimes you might just forget to visit the commenter url and detect a long time after that the linked site is spammy. Here is a very easy way to bulk delete all comments with a specific url, using a simple SQL query.

Just run the following query on your WordPress database to delete comments with nastyspamurl as url. Don’t forget to replace the table prefix wp_ if your database is using another prefix.
And of course, create a backup of your database before running the query!

DELETE from wp_comments WHERE comment_author_url LIKE "%nastyspamurl%" ;


One Comment

  1. Thanks for this tip.
    I am a new blogger and recently started on wordpress. your blog is helping a lot.

Leave a Comment

Your email address will not be published. Required fields are marked *