Changing the Admin Theme in Drupal 6 Directly in Database

天涯浪子 提交于 2019-12-06 08:13:53

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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!