Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the drush command to change a theme in Drupal 7?

Tags:

drupal

What is the drush command to change a theme in Drupal 7?

drush theme disable theme_name drush theme enable theme_name 

does not work.

like image 859
user550265 Avatar asked Jan 18 '11 17:01

user550265


People also ask

How do I change my Drupal theme?

Using the top menu area, click on the Appearance option. This will bring up the themes page. You will see all enabled themes in the top portion of the screen with the current theme at the very top. To enable a different theme, simply scroll down to theme of your choice and click on the link labeled Set Default.

What is Drush command?

Drush, aka The Drupal Shell, is a command line utility and UNIX scripting interface for Drupal. It allows access to common Drupal features and tasks via the command line. It can help speed up common tasks for Drupal site builders, developers, and DevOps teams.

Does Drush 10 work with Drupal 7?

Drush 8 is the default, recommended version. Cloud Platform defaults to the currently installed version of Drush 8. Drush 9 and Drush 10 aren't supported with Drupal 7.

What is the use of Drush in Drupal?

Drush is a command line shell and scripting interface for Drupal. Upgrading to Drupal 8 or higher using Drush is an alternative to using the browser user interface. Upgrading using Drush is very useful when migrating complex sites as it allows you to run migrations one by one and it allows rollbacks.


1 Answers

Take a look at the comment at http://drupal.org/node/530780#comment-2513534 which has the latest commands related to themes (actually, as of 3.0, but they seem to work with Drush 4.x as well).

  • Disable theme: drush -l http://example.com/ pm-disable theme_name
  • Enable theme: drush -l http://example.com/ pm-enable theme_name
  • Change theme: drush -l http://example.com/ vset theme_default theme_name
  • Change admin theme: drush -l http://example.com/ vset admin_theme theme_name
like image 124
sillygwailo Avatar answered Sep 19 '22 23:09

sillygwailo