Change wordpress theme from database

Posted by

1. Open phpMyAdmin

2. Go to your wp database.

3. Open wp_options table. Search for three option_name – templatestylesheet, and current_theme.

4. Run SQL

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

5. See the option_value fields from the search result. The option_value will be your theme name. Change option_value of the search result to ‘classic’ OR ‘default’. Classic and default are the default wordpress themes present at the time of wp installation.

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