Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 632 Vote(s) - 3.42 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the drush command to change a theme in Drupal 7?

#1
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.
Reply

#2
this will show you the themes you have:

$ drush pm-list --type=theme

output:

> Package Name Status Version
>
> Core Bartik (bartik) Enabled 7.25+1-dev
>
> Core Garland (garland) Disabled 7.25+1-dev
>
> Core Seven (seven) Disabled 7.25+1-dev
>
> Core Stark (stark) Disabled 7.25+1-dev
>
> Other ASU WebSpark Bootstrap (openasu_bootstrap) Disabled 7.26-dev
>
> Other Danblog (danblog) Disabled 7.x-1.0
>
> Other Danland (danland) Enabled 7.x-1.0
>
> Other Kalatheme (kalatheme) Disabled 7.x-1.4
>
> Other Kanji (kanji) Disabled 7.x-3.5
>
> Other Responsive Bartik (responsive_bartik) Disabled 7.x-1.0-beta2
>
> Other theme700 (theme700) Enabled 7.x-1.0

and

$ drush vset theme_default bartik

will change your theme to Bartik.
Reply

#3
To know current theme on site move inside project root directory and then

drush status theme

The above command will tell you the current theme set as default for site and admin both

Now change the site default theme using the below command (use theme name of your choice)

drush vset theme_default garland

The above command will make garland as default site theme

Now change admin default theme using the below command (use theme name of your choice)

drush vset admin_theme garland

The above command will make garland as default admin theme
Reply

#4
You can use:

- **drush vset theme_default THEMENAME**
- **drush vset admin_theme THEMENAME**

For example:

drush vset theme_default bluemarine
drush vset admin_theme shiny


These will set the site's default and admin themes, respectively.

Of course, they must both be enabled, preferably beforehand.

Check that things are set up the way you want using:

- **drush status** -- lists the current default and admin themes

- In Drupal 6 - **drush pml | fgrep -e themes** -- to check the status of each theme
(Enabled, Disabled, etc.)

- In Drupal 7 - **drush pml | fgrep -e Theme**
Reply

#5
Take a look at the comment at

[To see links please register here]

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: <code>drush -l

[To see links please register here]

pm-disable theme_name</code>
- Enable theme: <code>drush -l

[To see links please register here]

pm-enable theme_name</code>
- Change theme: <code>drush -l

[To see links please register here]

vset theme_default theme_name</code>
- Change admin theme: <code>drush -l

[To see links please register here]

vset admin_theme theme_name</code>
Reply

#6
drush dl theme_name
The above command downloads the theme.

drush en theme_name

The above command enables the theme.<br><br>
Now, to set the enabled theme as default theme use the below command.

drush vset theme_default theme_name
Reply

#7
Drush Commands for the specific change

drush vset theme_default THEMENAME
drush vset admin_theme THEMENAME

For example:

drush vset theme_default bird
drush vset admin_theme fly

These will set the site's admin theme

Settings for Drush

`drush status` -- lists the current default and admin themes

In Drupal 7 - `drush pml | fgrep -e Theme`
Reply

#8
### Drupal / Drush 8

The `variables` table has been replaced by the `config` table in Drupal 8, so the drush command `vset` will no longer work. For Drupal8/Drush8 use the following to set the default theme:

drush config-set system.theme default THEME_NAME

and the following to set the admin theme:

drush config-set system.theme admin THEME_NAME
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through