Remove Unapproved Comments

Experimental project

This is a sandbox project, which contains experimental code for developer use only.

This is a Drush script for removing massive quantities of unapproved comments that have usually got into a site by spambot due to unprotected comment forms. The script backs up 4 comment tables, deletes unapproved records from field_data_comment_body, field_revision_comment_body, and comment tables, then rebuilds the node_comment_statistics table. It removes all currently unapproved comments from the Drupal database. It works only for Drupal 7 with a MySQL database. It tests for D7 and MySQL before proceeding.

AttachmentSize
remove_unapproved_comments.pdf434.25 KB

Project information

  • Created by pkosenko on , updated