Change your WordPress theme from the database

WordPress themes are easiest to manage in WP Admin. However, this may not always be 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.

Don't have a website yet? 
With WordPress, you can easily and quickly build the website of your dreams.

Add to cart


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 options in 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.

Screenshot showing how to find options in phpMyAdmin.


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.

Screenshot template and stylesheet rows in phpMyAdmin.


Step 4 - Replace the current theme with a default theme

A default theme is a theme that was active when you first installed WordPress, this could be, for example, "twentytwentythree" or "twentytwentytwo". You need to choose a theme that is currently installed on your webspace, otherwise this step will not work.

Go to your File Manager > wp-content > themes folder to check which themes you have installed.

  1. Double-click the field option_value for template
  2. Replace the current theme, by writing the name of a default theme that is currently installed on your webspace. This could be twentytwentythree for example.
  3. Press enter to save.
  4. Do the same for stylesheet.

Tip: You can always just download the twentytwentythree theme for free and add it to your themes folder manually.

Screenshot showing how to change the theme in phpMyAdmin.


Step 5 - That's it!

The theme has now been changed. Your website should be accessible again, and you can log in to WP Admin.

If this doesn't solve your issue, you can try to disable your WordPress plugins manually.


Related articles:

Was this article helpful?

Can’t find what you are looking for?

Start a chat

It's the quickest way to get in touch, every day of the year.

Give us a call

Available on weekdays from 10am to 2pm (UTC).