Changing the Admin Theme in Drupal 6 Directly in Database
I'd like to restore the default admin theme in Drupal 6 via the database. Anyone know where this is stored?
Btw, there is a great answer describin开发者_JAVA百科g how to change your site's public theme in the database here ...I just could not get it to update my admin theme.
List of themes you can find in {system} table, filter by type = theme, there you can set status = 1
Default theme you can find in {variable} table, filter by name = theme_default, change it to you theme name, as it is written in system table (for example, garland, not Garland).
After this clear cache table.
Follow these steps via the db:
- {system} table, filter by type=theme set status=1
- {variable} table, filter by name=theme_default change it to you theme name, as it is written in system table
- {variable} table, filter by name=admin_theme change it to you theme name, as it is written in system table. Do not skip this step.
- truncate cache
Login to your phpMyAdmin, click on SQL tab and run:
UPDATE system SET status=1 WHERE name = 'garland';
UPDATE variable SET value='s:7:"garland"' WHERE name = 'theme_default';
TRUNCATE cache;
Note that you may need to add prefix to your tables
Thanks to https://drupal.org/node/200774
If you're editing the variables in PHPMyAdmin, remember that you're editing a serialized value. This means that the value you're editing looks something like this: 's:7:"garland"'.
If you just changed "garland" to "marvin" that would change the number of letters in the serialized value from seven to six.
You'd need to change 's:7:"garland"' to 's:6:"marvin"'
That is, you'd need to count the number of letters in your new theme, and update the number following s: accordingly.
精彩评论