How to Change WordPress Theme from Database


WordPress offers you a wide range of features in order to make your website more responsive and focused. From installing a plugin to changing the credentials everything can be done using WordPress. But nothing is perfect, not even WordPress.

Sometimes you might end up with some unknown errors. So it is always preferred to make the most appropriate decision. Whenever any website is updated, ultimately fields of the database get updated.

Then, why not use the database to modify the elements. Well, the database seems very complicated and if anything is saved then there is no coming back until and unless you have your backup, which most people don’t have. But in the worst situations, the database can be handy.

Why to use Change theme using Database?

It is never suggested using Database to change your website’s theme in the first place. You must use WordPress Admin Dashboard to perform any operation on your website. Using dashboard makes your process less prone to errors and breakdowns.

Database over WordPress is only preferred in the following cases:

  • First, when you are stuck with some unknown errors in your WordPress Admin Dashboard and can’t change your website’s theme. In Such scenarios you can use the database but try and fix the errors in the first place. Besides this, in order to fix the error, you can reinstall the WordPress on your website or can ask your hosting provider to do that for you.
  • Second, when you aren’t able to log in to your WordPress Admin Dashboard or you forgot your WordPress Admin Dashboard. Though you can check your website’s directory to find the login URl but sometimes, due to some breakdown WordPress might not work and you need to change the theme for your website urgently. Then you use the Database but if possible avoid using it.

Whole website is dependent on the Database and even experts developers think twice before directly accessing the database. One mistake can break the whole website into pieces and it might take a lot of time to be fixed again. For a normal user, Database is as sensitive as live electric wire, you have to be very careful and need to have appropriate guidance before accessing the database and modifying it.

Today, in this tutorial, you will learn How to change the WordPress theme using Database with all the preventive measures.

Quick Tip:

Before proceeding you must understand that an unsecured login to Cpanel could lead to website hacking. In order to avoid, you can prefer using VPN for security. There are dozens of VPN options available, you need to find your most suitable VPN. There are websites that review various VPNs regularly, you need to check their reviews and pick the best VPN.

Apart from this, it is assumed that you have already placed your desired theme in the appropriate directory if you haven’t then it is recommended to do it right now.

Note: Avoid Direct Login, always use a VPN (even Free).

How to use the Database to Change WordPress Theme?

As mentioned above, Database is usually quite complex and you don’t want to create a mess in it. In order to safely change the WordPress Theme, follow the below-mentioned steps carefully:

Step 1. Enable your VPN

This is the foremost step, in order to avoid hacking, unauthorized access to your website VPN is necessary.

Step 2. Login to your cPanel Dashboard.

Make sure you are logging in with correct credentials. Using the wrong details multiple times can lead to IP Block.

If you are familiar with your website’s database name then you can skip steps 3 to 8 but I would recommend checking the WordPress Database name using the following steps. Precautions are always better than cures.

Step 3. Navigate to File Manager on your cPanel Dashboard.

Step 4. Open File Manager.

Step 5. Navigate to your required website’s directory and open it.

Step 6. Find the “wp-config.php” file.

Step 7. In the “wp-config.php” file, look for the following field.

define('DB_NAME', 'user_wrdp1');

Note the DB_Name.

Step 8. Navigate back to cPanel Dashboard.

Step 9. Navigate to the phpMyAdmin icon on your cPanel Dashboard.

Sometimes phpMyAdmin could take a few minutes to load, be patient, and do not refresh the webpage again and again.

Step 10. Look for the same Database that you have noted in Step 7.

Step 11. Click and Open the specific Database.

Step 12. Look for the wp_options table in the Database.

Step 13. Open the table and look for the “Browse” option.

Step 14. Click on “Browse” and then select “show all” option.

Note: Show all” option must be checked because without it you won’t see the theme-related fields.

Step 15. Look for the “template” field.

Step 16. Change the field value to your desired theme name and save it.

Note: Before this make sure you have already placed the desired theme in the file directory of the website. If you haven’t then quickly navigate back to the “file manager” and open your website’s directory. There you need to go to “wp-content” and need to unzip your theme in the “themes” folder in it.

Step 17. Look for the “stylesheet” field.

Step 18. Replace the field value with your desired theme name.

Congratulations you have successfully changed your website’s theme using Database.

Final Note

In this tutorial, you just learned how to change the WordPress theme using Database. This tutorial is a bit sensitive for your website and skipping one step could lead to blunders. You have to be very careful. You will be dealing with the Database directly, one accidental modification can change your website’s structure. Besides this, make sure you are using a VPN for security.

Through Database, you can change every single element of your website and WordPress Dashboard isn’t actually required but Database is too sensitive to test random experiments. In order to try something new, you should use WordPress Dashboard but make sure before doing any modification, you have a local with you.

How to Change WordPress Theme from Database
Scroll to top