Skip to main content

How to Change WordPress Theme in the Database via phpMyAdmin

Sometimes, a theme or plugin update can cause problems that break your site and block access to the WordPress dashboard. When this happens, one safe way to get your site working again is to change the WordPress theme in the database to a default theme—like Twenty Twenty-Four—using a tool called phpMyAdmin. Don't worry if you're not a developer; this article will guide you step-by-step to restore clear and safe access to your website. Warning: Making changes directly in your database can break your site if done incorrectly. Always back up the entire website before proceeding.

  • When to Use This Method
  • Change WordPress Theme in Database
  • Related Articles
  • Summary

When to Use This Method

  • You updated a theme or plugin and now get a white screen or error.
  • You're locked out of wp-admin due to theme incompatibility.
  • You're debugging issues and need to revert to a known working theme.

Unsure which default themes are available! Check the /wp-content/themes/ folder via File Manager. You can also find your current theme in the /wp-config.php file.

Change WordPress Theme in Database

  1. Log in to your Bluehost Account Manager.

  2. In the left-hand menu, click Websites.

  3. Click the MANAGE button located next to the website you want to manage. Bluehost Account Manager - Website Manage button

  4. In the website overview page, click the PHPMyAdmin button. Website - Overview - PHPMyAdmin

  5. In phpMyAdmin, locate and click your WordPress site's database in the left sidebar. To determine which database your WordPress site uses, check the wp-config.php file or refer to this article: How to Find Your WordPress Database. php-my-admin-example-database

  6. Click the **wp_options**table (the prefix may vary, e.g.,example_options). php-myadmin-options-table

  7. Click the Browse tab.

  8. Check the box for Show All to view more rows.

  9. Locate these two rows:

  • template
  • stylesheet
  1. Click Edit on each, and in the option_value field, enter a default WordPress theme like twentytwentyfour, twentytwentythree, etc. style-sheet-template-save

  2. Click Go to save changes. php-option-value

Once both fields are updated, visit your site. You should now be able to access the dashboard using the new default theme.

  • How to Import or Export a MySQL Database using phpMyAdmin
  • How to Restore Your WordPress Site from a Backup
  • How to Enable WordPress Debug Mode (WP Debugging)

Summary

Changing your WordPress theme through the database is a reliable solution when you're locked out of your admin dashboard due to theme-related issues. By using phpMyAdmin to update the template and stylesheet values in the wp_options table, you can safely restore access to your site. Just remember to back up your database before making any changes—and if you're unsure, don't hesitate to contact our support team for help.