hi,

I have installed bootstrap theme on my drupal now i can find manage menu in this theme i wanna access appearance submenu but there isn't such a menu and it doesn't let me to acccess to through url so is there any way to change the theme?

Comments

Rajvi.addweb’s picture

Using below mentioned content you can change theme without using drupal appearance menu :

1.) Change the active theme with Drush :

=> For Drupal 7 :

drush vset theme_default garland

=> for Drupal 8 (Drush 7+) :

drush config-set system.theme default bartik

If drush fails with an error than install drush using following command:

-> To install drush without composer

sudo php -r "readfile('https://s3.amazonaws.com/files.drush.org/drush.phar');" > drush \
&& sudo chmod +x drush \
&& sudo mv drush /usr/local/bin

-> To install drush with composer; it will install latest version of drush

composer global requie drush/drush

2.) Change the active theme using the database :

The default theme setting is stored in Drupal's database, and this can be changed by manipulating the database from the command line or an administration overlay or client like PHPMyAdmin or MySQL Workbench for MySQL.

Always make a backup of your database before changing values in it directly, as it is possible to destroy data and render your site unrecoverable at the database level. You have been warned.

In Drupal 7, the setting is stored in the system table:

=> Activate a trusted theme

UPDATE system SET status=1 WHERE name = 'garland';

=> Change the default setting

UPDATE variable SET value='s:7:"garland"' WHERE name = 'theme_default';

And clear the cache tables

TRUNCATE cache;
TRUNCATE cache_bootstrap;
TRUNCATE cache_block;

If you are using per-user themes, and you've just messed it up for yourself as admin 

UPDATE users SET theme='garland' WHERE uid = '1';

In Drupal 8, the setting is in the  config table, and stored as a blob value for system.theme.

behnaz73’s picture

thank you so much now i'v installed drush but it says

config-set: command not found
as i enter drush to see all commands this command was'nt there at all(i'm in drupal 8,forgot to say)

Rajvi.addweb’s picture

@behnaz73 

Please try below code fot fix your issue :
=> Install Drupal Console

curl https://drupalconsole.com/installer -o /usr/local/bin/drupal && \
chmod +x /usr/local/bin/drupal

Hope this will work for you.
Thanks.

hoppytortoise’s picture

Please can you explain the procedure for modifying the blob value for system.theme in the config table  (Drupal 8)