Last updated August 27, 2014. Created on August 5, 2013.
Edited by owenpm3, koffer. Log in to edit this page.

Sometimes by mistake you delete a module in sites/all/modules or in the modules main folder in the sites root directory. Even if the deleted module is replaced with a copy of that same module it can sometimes fail to show up on the user interface.

To fix this problem you need to follow the instructions of the post in the following link:

https://drupal.org/node/157632

The module needs to be disabled in the database and its cache deleted in the cache_bootstrap table. To do this, follow the instructions below:

MySQL command line

To disable a module using the MySQL command line, run the following SELECT to look at the state of your data before the change. This will help you to find the full name of the module as well.

MySQL Commands

See all the modules enabled:
SELECT name,status FROM system WHERE type='module';

See if a particular module is enabled:
SELECT name,status FROM system WHERE name='module_name';

Disable your module, set the status to 0 for the module name that you want to disable.
UPDATE system SET status='0' WHERE name='module_name';

Enable your module:
UPDATE system SET status='1' WHERE name='module_name';

Check your handiwork using the SELECT statement again.

Drupal 7: Clear Cached System List

On Drupal 7, you must still follow the procedure above to disable the module in the system table. However, data from the system table is cached. This means that even though you updated the system table, Drupal may still think the module is enabled because its cached copy of the system table is not up-to-date.

The cached copy of the system list is in the cache_bootstrap table. Clear the cached copy of the system list as follows.

phpMyAdmin
If you are using phpMyAdmin, find the "cache_bootstrap" table, and delete the record with cid="system_list".

MySQL Command Line
To update the cache using the mysql command line, type:
DELETE FROM cache_bootstrap WHERE cid='system_list'

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