Last updated 22 August 2016. Created on 20 January 2006.
Edited by rhuffstedtler, figaro, mr.baileys, VM. Log in to edit this page.

A situation can arise where you've enabled a module through the user interface, but then because of a fatal error of some kind cannot get back to the modules administration screen to disable it (sometimes you cannot access any pages of your site at all): only the error is displayed and nothing else.

This can be resolved by executing the following query in the database (replace module_name with the name of the module you are trying to disable):

UPDATE `system` SET `status` = '0' WHERE `name` = 'module_name' LIMIT 1;

This will disable the module so that you can access your administration panel again. The module name is the filename (without extension) of the .module file. For example, views is the module name for /sites/all/modules/views.module.

Do not delete the module from the file-system before disabling (and optionally uninstalling it) via the instructions above or through the administration interface. Doing so might leave tables and other objects orphaned, and prevents the module from properly cleaning up after itself.

Looking for support? Visit the forums, or join #drupal-support in IRC.