Sometimes you are unable to login to your WordPress admin area due to some changes that you was made like Installed Plugins, Updates or Theme are not compatible with your current theme. So you want to change your theme but you are unable to enter to your WordPress dashboard then you can change your WordPress theme from Database via phpMyadmin.
For changing your WordPress theme from phpMyadmin follow the following steps:
If you want to change your WordPress theme from Database
then it is necessary that you have also uploaded that theme in your File Manager
which you want to enter in your Database
. So it is important to check if it is present in your File Manager or not. If theme is not available in "Themes"
folder under File Manager then you need to upload
Step1: Login to your cPanel
Click on "phpMyadmin"
section. You will redirected to phpMyadmin page
At the Left Side of phpMyadmin
click on "+"
. A list of Databases will open.
Click on Database Name
for which you want to change the theme. A list will open.
Click on wp-option
in the list. A table will open.
At the top bar click on "Search"
button. Four rows will open.
Now in the second row in front of option_name
Click on "Go"
button at the bottom right side. A row will open.
Click on Edit
button in front of the row. A page will open in which your current Theme's
name shows. Now you need to remove
current theme name and enter new theme Name
Click on "Go"
button at the bottom right side.
Now repeat 7,8,9 steps but now search "stylesheet"
instead of template
After Doing all the steps your website's theme will change and your website will open with the new theme.