As a customizable content management system, WordPress has something for everyone. There are around 2,140 themes and 28,100 plugins in the official WordPress directories alone, with a whole lot more available from third-party sources. With so many different themes and plugins to choose from, it is only natural that occasionally you are going to stumble on combinations that are not compatible. If a plugin or update does not work with a specific theme, it could leave you unable to access the admin area to fix the problem. This will mean that any troubleshooting has to be done via the phpMyadmin database.
In a previous guide, we showed you how to troubleshoot a problem plugin in the WordPress database; today we will show you how to use the same collection of files to change a theme. In the event that you are locked out of your site, this method can prove quicker than rooting out a rogue plugin.
Changing the theme
To get started with this task, you will firstly need to login to your cPanel interface. This can be done via the home page of your hosting provider.
In you cPanel, locate the category for Databases and find phpMyadmin.
Find your WP files and click on the option for wp_options. To the right of wp_options you should see a tab for Browse, click on this to access the full list of columns. There are two columns in particular that you will need when changing your theme: template and stylesheet. If you can see them listed, look for option to “Show all”.
In the template column click on Edit. You will then be taken to a new page where it is possible to edit the option_value. Find the name of your theme (for example, twentytwelve) and change it to the name of a different theme. As we are currently locked out of our WordPress dashboard due to a compatibility problem, it is recommended that you change the theme to the default option (twentythirteen).
With the change done, click on Go (or Save) to confirm it.
Now that the template column has been edited, you must follow the same instructions to edit the stylesheet column. Once again click on Go (or Save) to confirm the change and return to the column list. To the right of each of these options in the column list you should now see the name of the new theme.
To check if the change has been successful, visit your website. You should also now be able to login to your dashboard via yourwebsite.com/wp-admin.
With access to your site, you can set about configuring your new theme or changing it to something different or disable the problem plugin so that you can go back to using your original theme.