Question:
What are useful Drush commands for handling Drupal themes?
1. Disable a theme directly in config:
vendor/bin/drush config:set core.extension theme.zeendoc 0 -y
2. Set default theme:
vendor/bin/drush config:set system.theme default stark -y
3. Set admin theme:
vendor/bin/drush config:set system.theme admin stark -y4. Ensure theme is not marked as installed:
vendor/bin/drush config:get core.extension themeIf you still see badtheme listed, remove it explicitly:
vendor/bin/drush config:delete core.extension theme.mytheme -y
(Deleting is more reliable here than setting it to 0.)
5. Sanity check
Run these to confirm everything is consistent:
vendor/bin/drush config:get system.theme
vendor/bin/drush config:get core.extension themeYou want:
badthemeadmin≠badthemebadthemenot listed undercore.extension