I recently had an issue with a theme when updating wordpress. After the upgrade I was unable to get into the site or the admin. What I discovered was the Theme was causing the issue. I needed a way to change the theme outside of the admin. This post will show you what to change in the Database to set the active theme.
Accessing the Database
The first thing you will need is access to the database. By either command line or phpMyAdmin.
Once you select the database navigate to the wp_options table (you may have another prefix for the table instead of “wp”; Example: blog_options)
Edit the Table
Once you select the wp_options table you now need to find two rows. (Template and Stylesheet). You will be editing the value in these rows. I had to go to page “2” on phpmyadmin to find the values
Once you find the row select the edit icon . You will now need to replace the value with another theme name. In the image below my theme was called “next” I replaced it with “twentyfourteen”
If you do not have that theme on your system you can download it here. http://wordpress.org/themes/twentyfourteen
I was able to change to a theme that worked and make the appropriate adjustments to get the site running.
Hope this helps you.