Temporarily disable all modules for troubleshooting I have a bizarre error going on in the Drupal admin and I want to disable all modules to test if any of them are causing the problem. I have dozens of enabled and dozens of disabled modules. I can go through the process of writing down each module and its status, then manually disabling and re-enabling. However, that seems pretty tedious. Is there a better way to temporarily disable all modules without having to manually remember and tick them on/off?
You can collect the machine names of all the enabled modules with the drush pm-list --type=Module --status=enabled --pipe &gt; enabled.txt command.

And then iterate through the list do disable:

drush -y dis $(&lt;enabled.txt)


or enable

drush -y en $(&lt;enabled.txt)


them.