Divi: the easiest WordPress theme to use
Divi: The best WordPress theme of all time!
With over 901.000 downloads, Divi is the most popular WordPress theme in the world. It is complete, easy to use and comes with more than 62 free templates. [Recommended]
Recently, one of our readers asked us if he could change his WordPress theme from the database. WordPress simplifies the management of dashboard themes. However, if you are unable to access your WordPress dashboard, you will need to find other ways to modify your WordPress theme. In this tutorial, we will show you how to easily change your WordPress theme via phpMyAdmin.
Why and when to use phpMyAdmin?
Normally the easiest way to change your WordPress theme is to visit the page Appearance »Themes on your WordPress dashboard. However, sometimes a WordPress error can make the dashboard inaccessible.
In this case, the safest way to restore your website is to restore it from backup. Another way is to resolve WordPress error causing the problem. When it comes to troubleshooting, the easiest way to change the theme is to make a backup of your existing theme via FTP and then delete all folders and themes from / wp-content / themes / except the default theme. . WordPress will automatically revert to the default theme.
The two methods above will give you access to the WordPress dashboard, and you will be able to change the theme.
However, if you don't have a backup and don't want to revert to a default theme, you can use a custom WordPress theme from your database using phpMyAdmin.
That being said, let's look at how to change your WordPress theme via phpMyAdmin.
Change 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 use must already be installed on your website.
You will need to connect to your website using an 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.
Easily create your website with Elementor
Elementor allows you to easily create any website design with a professional look. Stop paying expensive for what you can do yourself. [Free]
Note: Write down the name of the theme folder you want to use. You will need it in the next step.
If the theme you want to use is not installed on your website, you can manually install a WordPress theme via FTP .
After making sure the 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 the cPanel dashboard of your WordPress hosting account. Next, scroll down to the Databases section and click on phpMyAdmin.
Once you are in phpMyAdmin you will see a list of databases on the left side of the screen. Just click on the database you are using for your WordPress site.
Then it will show you the list of tables in this database. You must click on the 'wp_options' table to open it.
Remark : By default, WordPress database tables use wp_ as the prefix for table names. However, it is possible to see a different prefix if you or an administrator of your site changed the prefix of the WordPress database.
When opening the table, you need to scroll down and find the 'template' and 'stylesheet' rows. Then click on the Edit button.
This will open the row editor where you need to change the value of the option_value field to whatever theme you want to use. This is usually the same as the name of the folder in the / wp-content / themes / folder.
Easily create your Online Store
Download free WooCommerce, the best e-commerce plugins to sell your physical and digital products on WordPress. [Recommended]
After that click on the "Go" button below to save your changes. Now repeat the process for the stylesheet row.
Once you have saved your changes, you can go to your website to see the new theme in action.
We hope this article has helped you learn how to change the WordPress theme via phpMyAdmin.