20130108 resetting your theme - plembo/onemoretech GitHub Wiki

title: Resetting your theme link: https://onemoretech.wordpress.com/2013/01/08/resetting-your-theme/ author: lembobro description: post_id: 3988 created: 2013/01/08 15:35:26 created_gmt: 2013/01/08 19:35:26 comment_status: closed post_name: resetting-your-theme status: publish post_type: post

Resetting your theme

For those of us who need to know ways to tear things back from the brink. Recently I made the heart-stopping mistake of activating a WordPress theme in spite of the fact that the previewer refused to preview it. This resulted in my blog becoming inaccessible. Duh. What now? "Use the database", came a far off voice. And so I did. Logged in and changed to operative database as with the user name and password in wp-options.php with mysql and then ran this query:

SELECT *
FROM wp_options
WHERE option_name = 'template'
OR option_name = 'stylesheet'
OR option_name = 'current_theme';

This gives the current setting of those parameters. To change them all I needed to do was this:

UPDATE wp_options SET option_value = 'monospace' WHERE option_name = 'template';
UPDATE wp_options SET option_value = 'monospace' WHERE option_name = 'stylesheet';
UPDATE wp_options SET option_value = 'monospace' WHERE option_name = 'current_theme';

Initially my front page was missing its sidebar and all the widgets that had been there, but I got it back by going in and just re-saving one of the widget items.

Copyright 2004-2019 Phil Lembo