345: How to change a theme via the database
Sometimes new changes such as plugins or updates are simply not compatible with your current theme. Often, with this incompatibility you are unable to enter the admin area to switch the theme. This can leave you in a circular problem as you need to change the theme in order to get into the admin area. In this scenario you will need to change it directly in the database. This article will guide you on how to do that within your WordPress site.
Changing your theme within phpMyadmin
- Log into your cPanel interface.
- Look for the Databases category and click on the phpMyadmin icon.
- Once inside the phpMyadmin look to the left hand sidebar and click on your specific wordpress database.
- From there, select the wp_options table.
- Once the table is opened, look to the tab menu on the screen and click on the Browse tab option. This allows you to browse the columns broken down into pages. Click on the Show All option at the top so it will list all the columns on one page.
- Next, you will need to locate two columns on the page, the template and the stylesheet columns. Pick template and click on the Edit link.
- This will take you to the column edit page where we will change the data for the option_value. In our example, the value is set for the alexandira template. Change this to the default theme name, twentythirteen and click on the Go button at the bottom of the page.
- Perform the same procedure on the stylesheet column. When you finish the stylesheet column and return to the column list, you should see the new theme in the value portion of the column list for both. You can now visit your website and see that it is using the default theme. From here you should also be able to log into your wp-admin area.
We value your feedback!
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
Post a Comment
Do you want to publish a tutorial to our support center?