How to change wordpress theme without wordpress admin panel ?

 

There are situations you can’t login into wordpress admin panel to change the wordpress theme.

You can do the following procedure to change it without login into wordpress admin.

1. Login using FTP and change the rename the theme name to temporary. Next time wordpress will revert back to default theme.

2. Change it directly from databse. To do that Enter into PhpMyAdmin or MySQL Console and execute below query,


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

To Check the current active theme name you can also execute this before updating it to default theme ,


SELECT *
FROM wp_options
WHERE option_name = 'template'
OR option_name = 'stylesheet'
OR option_name = 'current_theme';

 

( Be sure that theme folder contains the default wordpress themes comes with the installations ( TweentyEleven & TwentyTen until Version 3.0 ).

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s