Email-Icon Created with Sketch. Group 3 Created with Sketch. Domains-SVG-Box Created with Sketch. Domains-SVG-Box Created with Sketch. Domains-SVG-Box Created with Sketch. Hosting-SVG-Box Created with Sketch. Hosting-SVG-Box Created with Sketch. Icon-Internet Created with Sketch. Hosting-SVG-Box Created with Sketch. Icon-Internet Created with Sketch. Icon-Internet Created with Sketch. Hosting-SVG-Box Created with Sketch. Hosting-SVG-Box Created with Sketch. Trust Pilot Stars Created with Sketch. 1-5-million Created with Sketch. Control-panel-Icon Created with Sketch. WSB-Brush Created with Sketch. WSB-Brush Created with Sketch. WSB-Brush Created with Sketch. Email-Icon Created with Sketch. Email-Icon Created with Sketch. Email-Icon Created with Sketch. Email-Icon Created with Sketch. Icon-ECommerce-Seperator Created with Sketch. Icon-ECommerce-Seperator Created with Sketch. Icon-ECommerce-Seperator Created with Sketch. icon-slider-next Created with Sketch. icon-slider-prev Created with Sketch. Webmail-icon Created with Sketch. heart Created with Sketch. Open-24-7 Created with Sketch. open24 Created with Sketch. 24 7 trusted Created with Sketch. Fill 1 Created with Sketch.

Change your WordPress theme from the database

Step 1 - Open your database in phpMyAdmin
Step 2 - Click wp_options
Step 3 - Locate the theme in the table
Step 4 - Replace the theme
Step 5 - You're done!

Normally you manage your WordPress themes from the dashboard in wp-admin. In some cases this isn't possible, for example when you get a white screen after an update and are unable to login.

You can solve this by changing the active theme to a default theme from the database. After this you can login again to wp-admin and manage your site from there.

A default theme is the theme that was active when you first installed WordPress, for example twentyfifteen.


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 wp_options

In the menu to your left, click wp_options to open the options table.

Note: The table can have different prefixes, in this example it is www_. If you have used the 1-click installer the prefix is usually the location of your WordPress site.
Click wp-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.


Change template and stylesheet

Step 4 - Replace the theme

  1. Click the field option_value for template
  2. Replace the current theme with a default theme, like twentyfifteen.
  3. Press enter to save.
  4. Do the same for stylesheet.
Changed template WordPress

Step 5 - You're done!

The theme is now changed and your website is accessible again and you can log in to your WordPress administration.

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


Related articles:

Change your WordPress password in the database
Disable WordPress plugins in phpMyAdmin