How to Change WordPress Theme through phpMyAdmin

How to Change WordPress Theme through phpMyAdmin

You will have to change your current WordPress theme at one point in time. This happens when you want to change the way your website looks. You can change the theme from the admin area but did you know that you can change the WordPress theme from the database. This is a viable option if you cannot access the WordPress admin area.

Why and when to use the phpMyAdmin
The easiest way to change the WordPress theme is through the admin area. From the admin area, you just need to go to Appearance>>Themes pages. There are, however, times when you get WordPress error more so when the admin area is inaccessible. In this case, your best option is to restore the website from a backup or to troubleshoot for WordPress errors.

The above methods will work in giving you back access to the WordPress admin area. However, if you don’t have a backup, you can change the theme through the database using the phpMyAdmin. Here are the steps you need to take when you want to change the theme using phpMyAdmin.

Changing WordPress theme through phpMyAdmin
The best thing about this method is that it will tell WordPress the theme to use by changing information in the database. For this method to work, you must have installed the theme on your WordPress website. You will then need to connect using FTP client and go to /wp-content/theme/folder. That way you will see all the themes that you have installed on your site. Write down the name of the installed theme that you wish to switch to.

If the theme you want is not installed, you can install it manually. Once the theme is installed, make the changes through phpMyAdmin.

The first step is to visit cPanel dashboard of the WordPress hosting account. Scroll to the database section and select phpMyAdmin. Select the database that your website is using from the list of databases on the left side of the screen. Next you will be shown the list of tables in your database. Click on ‘wp-options’ table to open.

After you open the table, scroll and locate ‘template’ and ‘stylesheet’ rows. Hit the edit button located next to the template row. This opens to the row editor from where you can change the values for the option_value field to your preferred theme.

Once you are done editing, click ‘Go’ button to save the changes. You need to repeat this process for the stylesheet row. Once you are done, visit your website to see the new theme.

WordPress theme