Skip to main content

How to Change WordPress Theme via phpMyAdmin

Recently one of our readers asked us if they can change their WordPress theme from the database. WordPress makes it extremely easy to manage themes from the admin area. However, if you are unable to access your WordPress admin area, then you will need to find other ways to change your WordPress theme. In this article, we will show you how to easily change your WordPress theme via phpMyAdmin.

Change WordPress Theme from phpMyAdmin

Why and When You Need to Use phpMyAdmin?

Normally, the easiest way to change your WordPress theme is by visiting the Appearance » Themes page in WordPress admin area. However, sometimes a WordPress error can make your website admin area inaccessible.

In that case, the safest way to recover your website is by restoring it from backup. Another way is to troubleshoot the WordPress error causing the problem. In troubleshooting, the easiest way to switch themes is to make a backup of your existing theme via FTP, and then remove all theme folders from /wp-content/themes/ except for the default theme. WordPress will automatically revert to the default theme.

Both of the above methods will give you access to the WordPress admin area, and you will be able to change the theme.

However if you don’t have a backup, and you don’t want to revert to a default theme, then you can change to a custom WordPress theme from your database by using phpMyAdmin.

That being said, let’s take a look at how to change your WordPress theme via phpMyAdmin.

Changing Your WordPress Theme via phpMyAdmin

This method allows you to tell WordPress which theme to use by changing the information in the database. For this method to work, the theme you want to switch to must already be installed on your website.

You will need to connect to your website using a FTP client and go to the /wp-content/themes/ folder. There you will be able to see all the themes that are currently installed on your website.

WordPress themes folder

Note: Write down the theme folder name that you want to switch to. You will need it in the next step.

If the theme you want to switch to isn’t installed on your website, then you can manually install a WordPress theme via FTP.

After making sure that theme you want is installed on your website, you can now go ahead and change the theme via phpMyAdmin.

First, you need to go to cPanel dashboard of your WordPress hosting account. Next, scroll down to the databases section and then click on phpMyAdmin.

Open phpMyAdmin from cPanel

Once you are in phpMyAdmin, you’ll see a list of databases on the left side of the screen. Simply click on the database that you are using for your WordPress site.

Select Database

Next, it will show you the list of tables in this database. You need to click on the ‘wp_options’ table to open it.

Note: By default, WordPress database tables use wp_ as the prefix for table names. However, it is possible to see a different database prefix if you or an administrator on your site had changed the WordPress database prefix.

Select Table

Upon opening the table, you need to scroll down and locate ‘template’ and ‘stylesheet’ rows. Next, click on the Edit button next to the template row.

Editing rows in phpMyAdmin

This will open the row editor where you need to change the value for the option_value field to the theme you want to use. It is usually the same as the folder name in /wp-content/themes/ folder.

Change theme option value

After that click on the ‘Go’ button below to save your changes. Now, repeat the process for stylesheet row as well.

Once you have saved your changes, you can go to your website to see the new theme in action.

We hope this article helped you learn how to change WordPress theme via phpMyAdmin. You may also want to see our complete beginners guide to WordPress database management using phpMyAdmin.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Change WordPress Theme via phpMyAdmin appeared first on WPBeginner.

from: WPBeginner
via Editorial Staff

Source: How to Change WordPress Theme via phpMyAdmin Via Business Advice.

Comments

Popular posts from this blog

How to Add Web Push Notification to Your WordPress Site

Do you want to add push notifications to your WordPress site? Push notifications allow you to send notifications to users even when they are not visiting your website. In this article, we will show you how to easily add web push notifications to your WordPress site. We will also talk about the best WordPress push notification plugins and how to send desktop & mobile push notifications from your WordPress site. What is Push Notification? Push notifications are clickable messages displayed on top of user’s desktop or notification area on their mobile device. They can be shown even when the user’s browser is not open. Aside from desktop, web push notifications also work on mobile devices. This allows you to reach your users across devices with latest updates and offers. Web push notifications have proven to be a very effective way to convert website visitors into customers and loyal followers. Why Add Web Push Notifications to Your WordPress Site? We have already discussed tha...

5 Things You Should Know about Purchasing a Company Vehicle

  Many businesses require a vehicle to do business. It transports both goods and people from point A to point B and allows you to keep business dealings in-house. However, choosing a good company vehicle can be somewhat complex. You shouldn’t take the decision lightly. Here are a few things you should know before you buy a vehicle for your business: Accidents can happen, placing liability on you. You might think that an accident won’t happen if you hire drivers with a good track record and write a rule-book with strict policies and procedures. These are good tactics for mitigating some of the risks associated with commercial car accidents, but they won’t protect you completely. More than two million car accidents happen each year. Many of them are commercial truck accidents, costing millions in damages. Since commercial drivers are on the road more than personal drivers, they’re significantly more likely to cause an accident. Understanding the liability that’s placed on yo...

5 Essentials for Starting a Business in 2019

Is 2019 the year that you finally start your own small business or startup? There are a lot of good reasons to consider starting your company this year. You can do it. You don’t necessarily need a degree in business or finance to be successful. But keep reading—there are a few essentials for getting up and running that you won’t want to miss. 1. A great business idea If you’re kicking around a few ideas for your new company, or you think you have a concept but aren’t sure it will work, use these resources to help you think it through before you invest a ton of money and time. Validate your best ideas Our guide to coming up with a great business idea is packed with ideas for all kinds of industries. This article on generating hundreds of business ideas is a great place to start. When you’ve settled on one (or a few) favorites, download our free Business Idea Validation Checklist , which is an excellent tool for making sure your idea has legs before you invest any more time or...