The WordPress theme management usually takes place in the WordPress backend in the Appearance > Themes. However, in some situations, this may not be possible. For example, just after a WordPress update, or you updated your WordPress theme, your site may go all blank and you realize that you no longer have access to the backend. In such scenarios, the only way you can try troubleshooting the issue is by using your web hosting dashboard. This is where you will have to find an alternative way to change your WordPress theme without accessing the WordPress dashboard. Even though you can install additional themes using the file manager, it won’t be possible to activate them. You will have to access the Database in order to do that which is exactly what we are going to explain in detail.
In our previous article about disabling default WordPress themes, we have explained why is it recommended keeping the default WordPress themes on your website even though you are not using it. In such scenarios, if the default theme fails, WordPress can try activating the default WordPress theme on your WordPress installation. So, if there is no theme available WordPress has no option but showing a blank website.
How to Use Database to Switch WordPress Themes?
Assuming that you are using phpMyAdmin available in most of the managed WordPress hosting providers, the tutorial is going to focus on changing the theme using the phpMyAdmin database manager.
- Login to your Host and open phpMyAdmin looking at the dashboard under Database Tools or by manually searching.
- Locate the correct database of your WordPress website.
- Go to wp_options table (the table can have a different prefix than “wp” based on your web hosting preferences.)
- Look for the template and stylesheet in the wp_options table (usually located in the 2nd page by default.)
- Edit both of them and replace the values with the name of your theme. If you are using a child theme for the new theme, make sure to input the correct stylesheet which will be different from the template.
- As soon as you save the changes, the theme will be changed on your WordPress website.