Use drush to change site default theme and admin theme

Public

can be useful when site is breaking due to error at theme level ,mostly happens while upgrading the themes

</> CopyGet raw version
bash
  1. # to know current theme on site
  2. # move inside project root directory and then
  3. drush status theme
  4. #the above command will tell you the current theme set as default for site and admin both
  5.  
  6. # now change the site default theme using the below command (use theme name of your choice)
  7. drush vset theme_default garland
  8. # the above command will make garland as default site theme
  9.  
  10. # now change admin default theme using the below command (use theme name of your choice)
  11. drush vset admin_theme garland
  12. # the above command will make garland as default admin theme

Comments

Chi's picture

Why did you use php inline comments (//) in bash?

ooops's picture

@chi thanks for reminding, looks good now :)

cristina's picture

Any idea of how to use drush to change the theme with domain access for an specific domain?

msankhala's picture

i don't think domain module provide any drush command to change theme of a specific domain. Available domain commands are

  1. All commands in domain: (domain)
  2. domain-add Add a new domain to the site.
  3. domain-default Sets the default domain. If run from a subfolder, you must specify the --uri.
  4. domain-delete Delete a domain from the site.
  5. domain-list List active domains for the site.
  6. (domains)
  7. domain-repair Updates domain_id 0 records in dependent tables.
  8. domain-test Tests domains for proper response. If run from a subfolder, you must specify the --uri.
  9. generate-domains Generate domains for testing.
  10. (gend)