Bulk delete of unapproved comments in drupal 7

When you allow comments in your blog post or page, often you will be spammed with thousands of comments from spammers. One way to reduse it to use module like CAPTCHA.

IF you already have thousands of comments to your posts and would like to remove all the un approved comments here is the method.

  1. Enable the PHP format in your site
  2. Create a new content page and add the following code
.”
  1. Select your text format as PHP code
  2. Save
  3. Reload the page

That should run the php code and remove all the un approved comments from your database.

Bulk delete of unapproved comments in drupal 7

Leave a Reply

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