Disable drupal modules using MySQL query

This Comment will be submitted for moderation and will not be accessible to other users until it has been approved.


Sometimes, you may want to disable or enable drupal modules using mysql queries. In my case, it has happened when disabling a module during peak traffic hours. I can not afford to disable a module from standard interface, since, it rebuilds menu_router bringing load to the database server.

Connect to your mysql shell and then use following shell query to disable a module:

UPDATE system SET status=0 WHERE name='module';

To list all drupal modules:

SELECT * FROM system WHERE type='module';

Learn: Mysql string replace.





Post Comment

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.