How do I change a theme through the database instead of logging into the site as admin?
Thanks

Comments

terryarthur’s picture

I hope you didn't get in the same situation I found myself in. I changed themes with the nice menu block enabled but not the proper navigation block. The new theme had the CSS set to hide overflow in the region I had my menu in and I couldn't get back to the admin to change the theme.

So here si what I found;

The default theme setting is found in the 'variable' table of your DB.

Change the name of the theme found in this table to the one you want as well as the number.

Here's what my DB entry looks like:

theme_default s:12:"channel_nine";

I don't know what to tell you about the number except to try starting at 1 and working your way up until the new theme you want works.

Hope this helps.

Terry Arthur

lahav’s picture

In the 'variable' table the number before the string is actually the string length.

Lahav

abhinya’s picture

While playing with the themes, i messed pretty bad.
The best part is i damaged the production site.

I go to the site and we all were getting blank page.
chaning the database name did not help so had to try out some thing.

Went to the themes folder and deleted the theme that was configured as default

Next went to
http://www.yoursite.com/admin/build/themes
and changes to another available theme as default theme

Now the site was back on line (Gods Grace)

Next uploaded a fresh folder of the original theme

then went back and change to the theme that i messed up with in the first place.

thank God the site came Back.

Two things:

1. Thank you guys for the forum and the answers
2. some times we might have to sit back and see where the error could happen.
3. we need to seal all site configuration changes and then neven touch the production site untill every thing is tried and tested and sanctioned.

Almost lost my JOB

Insha Allah