Sometimes sites get broken after an upgrade due to a bad theme or plugins. Renaming the plugins directory will usually fix the problem and renaming the theme will sometimes help, however, sometimes the theme is just too problematic and it needs to be switched back to the default theme.
- 1st:
Go into the cPanel, look for the Databases section and click the phpmyadmin link. (note you may need to setup a password using the “Reset MySQL Password” icon before you can log in.)

- 2nd:
Select your WordPress database. (If you aren’t sure which database to select, check your wp-config.php file in the root location of your WordPress installation)
- 3rd:
Select the ‘wp_options’ table (if you have another table prefix ‘tableprefix_options’)

- 4th:
From the header bar choose the “Browse” tab.

- 5th
Select page 2 from the tables footer:

- 6th
Now you’ll need to edit (
) the ‘template’ and ‘stylesheet’ rows and put in the word “twentyten”, or put in any other theme you want there. Press “Go” when you are done.





55 Comments until now
Looks like using wordpress is more easy to use after rading your post…
Keep posting
Thanks so much, you saved me from the dreaded blank WordPress screen of death!
I’m glad I was able to help you. Enjoy your functioning WordPress!
thanks alot friend. our post helped me alot. its really great thing otherwise i was goin to reinstall my wordpress blog and ready to lose all my old blog data
Brilliant post – took less time to fix the mistake I made than it did to commit it.
appreciate this post very much!
Jason
Hi, admin! – Many thank’s for this instruction…
I wanted migrate from wordpress.com to an own wordpress.org platform, so I setup a test server 1st with the same old theme (Andreas09 from 2006) – http://bit.ly/8XqcpG (Rec.: You see it now with the new theme.)
But I only got a white screen after installing a new theme, it was no more possible to go back (later I upgraded the WP 2.86 to WP 3.01 and then this new theme (Hybrid News) worked proper.)
I searched a lot on the web to find some help, even I posted at wordpress.org (where you now can find the link to your instructions here: http://wordpress.org/support/topic/hybrid-theme-fatal-error-1?replies=5#post-1668222 ). But there it seems – so my experience with this forum – mostly I never get answer.
It seems the only way to get back the dashboard onto the screen is your method… therefore many thank’s that I didn’t need to install the whole test environment new… WP meanwhile becaome so complexe that its really a time eating job.
The world needs such guys like you!
you r a life saver!
Thank you very much – I had tried renaming the plugins folder and then the theme to force the default to resent, which didn’t work, and sure enough the SQL was still showing the original theme in template and stylesheet. You’ve saved me loads of time and I really appreciate your step-by-step instructions. Thanks and keep blogging!
This was fantastic and helped me when I was in a bind. thanks!
Thanks a lot for these easy to follow instructions. I broke my site during an upgrade, but managed to fix it very quickly by following your post. Thanks again!
Thank you!!!! I never get that deep in the website stuff, and you walked me right through the stupid fatal error. You’re the berst!
Thanks man, really helped me out!!!
I don’t have a browse tab??
David,
The browse tab is only available there *after* you select your database. There is a list of databases on the left. Make sure you select your desired database first. You can then select your table and, after it loads, your browse tab will become available.
If your browse tab is grayed out and you cannot click it, then you have no content in your table… which is bad. And you will probably have to restore from a backup.
Thanks for the efforts, you saved me the hassle of having to start my blog afresh. And it would have been terrible as I had not backed up. GOD BLESS YOU!
Database will keep option my themes or not ? I’m using thesis theme and it has many option themes !
Rihanna: That really depends on how your theme works. If you have made custom edits to it, they should be maintained, but I cannot say for certain if all your custom settings will remain. I would think they would. Try it and, if it doesn’t, let us know.
Lifesaver! Accidently pressed ‘activate’ on a bad theme and took my website down – couldn’t even access wp-admin! This was so easy to follow and has got my website back online. Thank you!
Your a life save … I LOVE YA MAN!!!!!!
Thank you sir very much. It helped!
Wow, this actually worked I couldnt believe it. Superb instructions. Bravo. I was sweating so hard all night and then found this post and it was resolved inside a minute! Unbelievable. Thanks again
OMG!!!Thank you so much! I renamed my theme and could not access my site all I sa was errors, could not access admin area. I thought I was gonna have to start over. I was panicking until I saw your blog. It worked. Thank you. Thank you. Your a savior.
amazing, thank you thank you thank you
After change of theme I am facing problems with two plugins 1. wp_pagenavi which shows errors on upgrade. and 2. Max Banner Ads that is not getting activated. Any idea?
Some themes already use variations of the wp_pagenavi and thus, depending on what theme you switched to, it could be breaking it. Try the twentyten theme. If problems persist, you may need to re-upload/re-install the plugin.
Also try re-installing max banner ads while testing on a different theme such as twentyten or twentyeleven.
Your posting really starihgetend me out. Thanks!
This is exactly what I needed! Thanks so much!
Thank you very much for this post …!!!! I have spent 2 entire evenings to solve it without result….!!!
Thank you so much…!!!
Thx very much … i was sure to find it in php but u helped to find the path saved my time ..
Once again thanks
Arggh, I can’t believe people put out themes that will break your wordpress site. The audacity of these people! I greatly appreciate your very helpful and concise guide. Cheers!
Perfect!
A little clarification for us already confused WP admins:
“Now you’ll need to edit (Change WordPress Theme through PHPmyAdmin) the ‘template’ and ‘stylesheet’ tables”
- those template and stylesheet are rows, not tables.
Oops. Good catch. Thanks Veikko. That’s been fixed now!
Hi, cheers for the post. I did what you said but its still saying stylesheet is missing for the theme i had (evolve). in the first page of the browse tab in the second row its still got things about ‘twenty eleven’ do i need to change this as well?
Guess what? I set out to make my comments look prettier and managed to fold the whole site. It was the functions.php file I was fooling around in…which is waaay above my pay grade.
The trick of sitelology is knowing how to get out of trouble as quick as you get into it and I’m NO WordPress expert.
So, it was fix it or start the site over from scratch.
I got HostGator support on the screen and he had me fixed in under 5 minutes.
Guess what he told me? He told me he used YOUR page as a guide! Yep, HostGator support is using your stuff.
I’d say that’s a compliment in any man’s book.
I have you bookmarked big time. I think I’ll bookmark you twice. At any rate I don’t plan on fooling with that dang functions.php file EVER again.
You saved my bacon and I don’t even know your name. THANKS!!!
Norm
You’ve saved me!!! thanks!
Thank You!I was need it!
Very simply and nice tutorial and straight forward. My friend once had this problem and he couldn’t solve it and his host couldn’t help matter. He contacted me to help him out.
I also published a post on how to solve the problem: http://utibeetim.com/how-to-change-to-default-wordpress-theme-through-phpmyadmin/
thanks so much. my site frontend and backend was inaccessible after something with my childtheme went wrong. this saved me. its important to note that (for me anyway) the same of the template is the same name as the stylesheet in phpmyadmin.
Thank you for this article! You helped me get back into my blog after a theme change to “live-wire” effed up.
Cheers!
Christian
So do you have to switch to a default theme or can you switch to a theme that you formerly installed but haven’t used in awhile?
Martha, yes, you can use whatever theme you want as long as it is installed. I would highly suggest you stay away from old themes though. The #1 reason for hacked WordPress sites are outdated plugins and themes. Delete any such things which you have, even if they’re inactive, because they can still be accessed by hackers when they’re inactive.
thanks mate, my website was down as I installed a new theme, I just followed your post and its up again
Really help
#1142 – UPDATE command denied to user ‘db name’@’66.40.52.21′ for table ‘wp_options’
how to solve this problem.
The active theme is broken. Reverting to the default theme.
Muralidhara,
That really depends on your theme. Most themes don’t have to separately connect to the database. If yours is separately connecting, it seems that it has the wrong user, database name, or password. Also, you should not use the IP address, but should use localhost instead. So your user/host would look something like username_dbuser@localhost
It’s Very nice Article for change wordpress theme from database.
http://youknowlinux.com/how-to-change-wordpress-themes-from-the-database-or-phpmyadmin/
Above link also help you for change wordpress theme from database
You just saved me. I broke my WP site because I updated WP to 3.5 but the template I was using had some bug. They fixed that template but I did WP first before the template. Site broke. Could not logon.
This suggestion allowed me to go back to twentyten and then update the theme I was using.
Totally works. 100% functional with about 2 changes to the DB.
Wow! Thanks.
Cheers for that. I had an unknown error in my php code that I just couldn’t debug – something to do with an unexpected ‘<' in my custom-image.php file.
Spent an hour trying to debug, then decided it was probably an error in the functions file which was calling it.
I think it's a bug in the new twentytwelve wp theme.
Anyway, switched theme using this method and I'm back online!
Cheers,
LS
Thank you so much!!! Not only for helping restore my website theme from that awful white page but for speaking in plain English and not technical terms.
awesome, save my time a lot, thanx
Saved me! Thanks!
What a lifesaver! now why doesn’t bluehost give you this info??
THank you soooooooooooo much.
YOU ARE THE BESTTT!!!!! THANKS A LOT!
Thank you, thank you, thank you! I was sure my blog was lost forever. Was trying out new themes and tried the “wedding bells” one and then BAM I could no longer access my blog or my wordpress admin
So happy I found this post, you made it so simple!
Saved me from that blank screen ! I really appreciate your work.
THANKS !
Add your Comment!