Skip to content Skip to navigation

Disable and Re-Enable All Contributed Modules at Once

Posted by: 
Topics: 
Tags: 

To turn off all contributed modules in your site at once (for instance, in preparation for a site upgrade), use the following SQL command:

UPDATE g_group_databasename.system SET status=0, throttle=-1 WHERE 
(filename LIKE 'sites/all/modules%' ) AND status=1 AND type='module'

To turn back on:

UPDATE g_group_databasename.system SET status=1, throttle=0 WHERE 
(filename LIKE 'sites/all/modules%' ) AND throttle=-1 AND type='module'

These commands assume the following:

  1. You've installed all contributed modules in sites/all/modules
  2. You're not using throttling on any modules (although it probably would work even if you were)
(Many thanks to Jessie Keck for this little bit of SQL wizardry.)