How to manually change your Wordpress theme
I was working on another blog tonight and for some reason the theme I was using had a problem with widgets. Soon as I changed a setting in options, I’d get a PHP error which was pretty annoying. I couldn’t get into the admin at all and figured out a simple way to update the theme manually to at least be able to get into the admin.
The theme being used is stored in the wp_options table in the database. Simply run these MySQL scripts and your site will be set to using the default theme (it’s based on the theme folder name):
update wp_options set option_value = ‘default’ where option_name = ‘template’
update wp_options set option_value = ‘default’ where option_name =’stylesheet’
Hopefully that’ll save you some time ripping your hair out if you stumble on a theme that trashes your admin.
Related posts:
December 30th, 2009 at 2:44 pm
Thanks for the tip. I actually found an easier way -
update wp_options set option_value =’classic’ where option_value = ‘philna2′
In my case, I was having php error with philna2 theme, and I had to replace it with classic. THe above sql will update all occurances of philna2 theme and it worked fine for me.
Thanks,
Deepesh
February 3rd, 2010 at 2:39 pm
Nice tip.
I just changed the value manually in mysql and it worked.