How to change a theme without login to WordPress Admin Area

SUPPORT US
Pay for an account and support us

In this tutorial I will show you how to change a theme without login to Admin Area.

Check the name from wp-config. file. the database using the following from shell.

:

mysqldump database_name > database_name.

:

mysqldump –opt -uadmin -p`cat /etc/psa/.psa.shadow` database_name > database_name.sql

Now, login to phpmyadmin and select the database_name.

In the database click on table wp_options.

In wp_options click on SQL tab.

Execute the following queries for finding out the current theme enabled for wordpress site.

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

Now, execute the following query for changing the theme for wordpress site.

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’;

Replace default with theme name.

Check the theme again by running below command.

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

SUPPORT US
Pay for an account and support usPay for an account and support us
Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *