Knowledge Base Article

How to disable comments in Drupal

Very often Drupal (especially outdated versions) has problems with Spam bots which flood its comment modules.

The first thing to do in this case is to disable the comments modules until you clean all the Spam posts.

This can be done in two ways:

If you have admin access to Drupal log in and go to  Administer - Content - Content Types. Then edit the content type of your choice and make sure comments are set to off by default.

Alternatively the above can be done directly by executing the following query in your database:

UPDATE system SET status = '0' WHERE filename =  'modules/comment/comment.module';

When you decide to re-enable the module simply issue the reverse query:

UPDATE system SET status = '1' WHERE filename =  'modules/comment/comment.module';

A good choice for fighting spam bots is using a captcha module in combination with Akismet. This way you ensure that even if a bot passes your captcha module, Akismet will check the post against a huge spam database. Only after that the post will appear.



Rating

Please indicate if this article was helpful for you.

rating :  4.5 from 5
views :  5407
votes :  14

Haven't found what you are looking for? Suggest an article HERE.

powered by

Valid XHTML 1.0 Strict Valid CSS!