The easiest way to manage your WordPress themes is inside your WP Admin. However, in some cases, this isn't possible, for instance, when you get a white screen after an update and are unable to log in.
This guide shows you how to change the active theme to a default theme from the database. After this, you can log in again to WP Admin and manage your site from there.
- Step 1 - Open your database in phpMyAdmin
- Step 2 - Click "_options"
- Step 3 - Locate the theme in the table
- Step 4 - Replace the theme
- Step 5 - You're done!
Step 1 - Open your database in phpMyAdmin
Read our guide on how to access your database if you don't know how to do this.
Step 2 - Click "_options"
In the menu to your left, click on your version of "_options" to open the options table. If you have more than one installation, it can be helpful to look for the term optionsin the search bar.
Note: The table can have different prefixes. A prefix is the identifier that comes before the part "_options". Some examples are: "www_options", "wp_options" or "subdomain_options"
If you have used the 1-click installer the prefix is usually the location of your WordPress site. In our case it is called hello_options, since our WordPress site is located on the subdomain hello.one-example.guide.
Step 3 - Locate the theme in the table
Find the rows called template and stylesheet. They are usually located on page 2 in the options table.
Step 4 - Replace the theme
- Double-click the field option_value for template
- Replace the current theme, by writing the name of a default theme, like twentytwentyone.
- Press enter to save.
- Do the same for stylesheet.
Note: A default theme is a theme that was active when you first installed WordPress, for example, "twentytwentyone" or "twentynineteen".
Step 5 - You're done!
The theme is now changed, and your website is accessible again. You can log in to your WP Admin.
If this didn't solve your issue, you can try to manually disable your WordPress plugins.