Change my WordPress theme in the database
You can change your WordPress theme from within the database. This is an advanced method, but it can be helpful if you can't access WordPress dashboard due to an issue with your active theme.
Warning: Always make a backup of your site before making any changes to the database.
Note: You can only activate themes which are installed on your site.
- Sign in to phpMyAdmin.
- In phpMyAdmin, in the left menu, select the name of the database your site uses.
- Select the wp_options table (select the text, not the checkbox).
Note: wp_ is the default database table prefix. If your table prefix isn't wp_, focus on finding _options. There should only be one _options table.
- Under the option_name column, find the template entry. You may need to navigate beyond the first page of entries.
- Select Edit next to the template entry.
- In the option_value column, change the value to the name of your theme. The new value must be the same as your theme's folder name. For example, to activate the Twenty Twenty-One theme, change the value to twentytwentyone.
- To save, scroll down to the bottom of the page, make sure that Save and then Go back to the previous page is selected and then select Go.
- Select Edit next to the stylesheet entry.
- Repeat steps 6 and 7 to change the stylesheet information.
More info
- Disable WordPress plugins in the database
- If you're troubleshooting errors on your site, we recommend switching to one of the default WordPress themes.
- If you can access the WordPress dashboard, you can change your WordPress theme there.
- If you don't want to change your theme yourself, our WordPress Premium Support team can do that for you.