Date Posted: 17-03-2017

There are few scenarios where we have no control over wordpress admin panel due to various reason. In such cases, if we want to change themes, here is the easy way to change the theme from backend.

Assumption:

  1. WordPress installation
  2. Server SSH access or PhpMyadmin access or Mysql/MariaDB access via command line.

Implementation:

Login to server or access Phpmyadmin or access Mysql commandline.  In this post, we are going to change the theme from twentysixteen. Incase, if you want to change different theme, make sure that theme and corresponding directory exist on wp-content/themes.

UPDATE wp_options SET option_value = 'twentysixteen' WHERE option_name = 'template';
UPDATE wp_options SET option_value = 'twentysixteen' WHERE option_name = 'stylesheet';
UPDATE wp_options SET option_value = 'twentysixteen' WHERE option_name = 'current_theme';

As mentioned above, replace appropriate theme name incase if we meant to different theme.

 

Leave a Reply