Recover WordPress from broken theme

If you ever find yourself with a broken theme and can’t even access the admin side of your wordpress blog, here’s a quick way to get back on your feet.

Simply run the following query from the command line or via a tool like phpMyAdmin

[cc lang=’mysql’ line_numbers=’false’]
UPDATE wp_options SET option_value = ‘default’
WHERE option_name IN (‘template’,’stylesheet’,’current_theme’);
[/cc]
(Make sure to select your wordpress database first, of course)

Sure. Your site looks like it was just setup 2 seconds ago, but at least now you can access all the GUI-licious tools of the WordPress Admin panel to fix whatever broke your theme.

Andrew

Programmer / Musician / Soccer Player

10 thoughts to “Recover WordPress from broken theme”

Leave a Reply

Your email address will not be published. Required fields are marked *