This post may contain affiliate links, which means I may earn some commission: More details.
Using WordPress is quite easy, anyone can handle WordPress even without having much technical skills. Changing and Customizing WordPress themes are very easy. However, if you accidentally mess up with your theme’s code or your site is broken, you’ll not be able to access your WordPress admin panel.
So if you’ve messed up with your theme’s function codes, you need to fix or change that particular theme via cPanel. Recently while working on my client’s site, I accidentally messed up with functions.php file. Later I had to Change the Theme directly from phpMyAdmin Database to fix the issue.
There are a couple of methods to change the WordPress theme from database; one method is by using SQL query in phpMyAdmin. And the second method is the easy one that I’ll explain in this article.
How to Change WordPress Theme directly from Database
Before we start, please take a complete backup of your database. If you’re not sure how to create backups, contact your hosting.
Step 1: Log-in to your cPanel.
Step 2: After Logging into your cPanel, Look for the Databases category and click on the phpMyAdmin. See the below image.
Step 3: You’ll land inside the phpMyAdmin panel, now on the left sidebar locate your particular WordPress database and click on it. In this example, my WordPress database is in the second position.
Step 4: Now you can see varies tables, select the wp_options table.
Step 5: Once the table is opened, you need to locate three columns on the page, the template, the stylesheet and the current_theme column.
Step 6: Now click edit, it will take you to the column edit page where you need to change the data for the option_value. In this example, the value is set for the genesis template. Change this to the default theme name, twentyfourteen and click on the Go button at the bottom of the page.
Step 7: Now repeat the same procedure on the stylesheet and the current_theme columns. When you finish, return to the column list, you should see the new theme in the value portion of the column list for all.
That’s it! Your WordPress theme will be changed to twentyfourteen default theme. Now you can check your site to see the changes.
Above is the easy method to Change WordPress Theme directly from phpMyAdmin Database. Before you perform the action, please take a backup of your database. If you have any doubts, leave a comment below.