Change your WordPress theme in the database – help

The easiest way to manage your WordPress themes is in your WP Admin. However, in some cases this is not possible, e.g. B. If you get a white screen after an update and can’t log in.

This guide will show you how to change the active theme to a default theme in the database. After that, you can log back into WP-Admin and manage your website from there.

Step 1 – Open your database in phpMyAdmin

Read our guide on how to access your database if you don’t know how to do it.

Step 2 – Click on “_options”

Click in the menu on the left on your version of “_options”to open the options table. If you have more than one installation, it may be helpful to search for the term in the search bar options to search.

A notice: The table can have different prefixes. A prefix is ​​the label that comes before the “_options” part. Some examples are: “www_options”, “wp_options” or “subdomain_options
If you used the 1-click install tool, the prefix is ​​usually where your WordPress site is located. In our case, it’s called hello_options because our WordPress site is on the hello.one-example.guide subdomain.

Step 3 – Find the theme in the table

Find the rows with names template and style sheet. You can usually find these on Page 2 in the “Options” table.

cp_php%2Bdb_step3_locate-the-theme.png

Step 4 – Replace the theme

  1. Double-click the field in the column option_value Next template
  2. Replace the current theme by entering the name of a default theme, e.g. B. twentytwentyone.
  3. Click Enter to save this.
  4. Repeat this process for style sheet.

Note: a Default theme is a theme that was active when WordPress was first installed, for example “twentytwentyone” or “twentynineteen”.

cp_php%2Bdb_step4_replace-the-theme.png

Step 5 – You’re done!

The theme is now changed and your website is accessible again. You can login to your WP Admin.

If this did not solve the problem, you can try disabling your WordPress plugins manually.

Related articles: