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 guide will walk you through each step clearly and safely so you can restore access to your website.
Important: Making changes directly in your database can break your site if done incorrectly. Always back up your database before proceeding.
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.
Note: If you're 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
- Step 1: Log in to phpMyAdmin
- Step 2: Select the WordPress Database
- Step 3: Edit the Theme in wp_options
- Step 4: Check Site Access
Step 1: Log in to phpMyAdmin
via the Websites Tab
- Log in to your Bluehost Account Manager.
- Click on the Websites tab in the main navigation menu.
- Single website? You'll be redirected to the Website Overview page.
- Multiple websites? Click the Settings button for your desired website.
- Search for the Quick Links tile and click the PHPMYADMIN button.
via the Hosting Tab
- Log in to your Bluehost Account Manager.
- Click on the Hosting tab in the main navigation menu.
- Single hosting plan? You’ll go directly to the management page.
- Multiple plans? Click Manage under All My Hosting Packages.
- Search for the Quick Links tile and click the CPANEL button.
- In cPanel, go to Databases, then click phpMyAdmin.
Step 2: Select the WordPress Database
- In phpMyAdmin, locate and click your WordPress site’s database in the left sidebar.
- If you don’t see the list, click the + next to your username.
Step 3: Edit the Theme in wp_options
- Click the
wp_options
table (the prefix may vary, e.g.,example_options
).
- Click the Browse tab.
- Check the box for Show All to view more rows.
- Locate these two rows:
template
stylesheet
- Click Edit on each, and in the option_value field, enter a default WordPress theme like
twentytwentyfour
,twentytwentythree
, etc.
- Click Go to save changes.
Step 4: Check Site Access
Once both fields are updated, visit your site. You should now be able to access the dashboard using the new default theme.
Related Resources
- 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.
If you need further assistance, feel free to contact us via Chat or Phone:
- Chat Support - While on our website, you should see a CHAT bubble in the bottom right-hand corner of the page. Click anywhere on the bubble to begin a chat session.
- Phone Support -
- US: 888-401-4678
- International: +1 801-765-9400
You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.