How to change WordPress theme directly from database?


Sometime you want to change WordPress theme without login in site backend. For example If you upgrade wordpress site and after complete upgradation of site you found that site is stop working. You may see just a blank page instead of newly updated site. This situation may happen if your old theme not support the newly upgraded WordPress. If this happen you may lost access of site frontend as well as backend also. In this case if you have access of database then you can change the current wordpress theme using MySQL query.
Following steps shows that how you can fix this problem so you can change the wordpress theme without login in backend.
Step 1 : Open phpmyadmin.
Step 2 : Write following mysql commands in sql window of phpmyadmin.
Step 3 :

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

This command will change the new wordpress theme. Now refresh the site and you will see the site newly updated theme.

Above tutorilas shows that you can change your wordpress theme without login in site.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s