How to change theme from database in wordpress

If you are not able to login to wp-admin to change theme, you can change it from database. 

  1. First open phpmyadmin
  2. Open database assigned to your website you want to manage. If you don’t know which database is assigned to database, you can check from wp-config.php file from file manager of your hosting account. 
  3. Find wp-options table and click on “browse” next to it. 

4. When you reach here, under “options_name“, you need to find “template“. You have to navigate to next pages in order to find it. 


5. Once you found “template“, click on “edit” and you then you can change name of theme. As you can see I’m using themify_ultraa theme.  Enter name of theme you want to switch (for example “twentyseventeen” This theme comes as default with wordpress and as you can see in below image, I changed theme to twentyseventeen. 


At last, after changing name, click on go and find “stylesheet“. It must be under “template” in “options_name“. Change name of there as well and that should do it.