Drush saves the day

Today, while theming a Drupal site, I got stuck on a particularly tenacious whitescreen. Deleting the cache, disabling recently enabled modules, checking the logs, nothing seemed to help.

Switching to another theme might have been a quick fix, but the whitescreen made it impossible to log into the theme admin section. This situation used to call for some careful database editing. But thanks to Drush, we can now fix this problem right from the command line.

The helpful Drush theme related commands:

Status of the sites themes: drush status theme

List themes: drush pm-list --type=theme

List enabled themes : drush pm-list --type=theme --status=enabled

Set the default theme: drush vset theme_default

Set the admin theme: drush vset admin_theme

And yes, setting theme_default to another theme (drush vset theme_default rubik) did make site available again. Drush saves the day, another a whitescreen defeated!