Change WordPress Theme from Database

Number of Views : 1971

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.

theme1

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)

theme2

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

theme3

Once you find the row select the edit icon theme4.  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”

theme5

If you do not have that theme on your system you can download it here. http://wordpress.org/themes/twentyfourteen

Conclusion

I was able to change to a theme that worked and make the appropriate adjustments to get the site running.

Hope this helps you.

 

 

Leave a Reply

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