As experienced WordPress administrators, we've helped countless users recover site access when the admin dashboard fails. While managing themes via Appearance » Themes is straightforward, inaccessible admin areas due to bugs require database intervention. This proven guide shows you how to safely change your WordPress theme via phpMyAdmin, drawing from years of real-world troubleshooting.

The admin area is ideal for theme switches, but errors can lock you out. First-line recovery: restore from backup or fix the issue. Alternatively, FTP-delete non-default theme folders from /wp-content/themes/ to auto-revert to a default theme, restoring admin access.
These steps regain control without database edits. But if backups are unavailable and you prefer a specific custom theme (already installed), phpMyAdmin offers precise control from the database.
Let's walk through the secure process we've used successfully on production sites.
This updates database entries to activate an installed theme—no uploads needed if it's present. Verify via FTP in /wp-content/themes/; note the target theme's folder name precisely.

Pro Tip: Match the folder name exactly for the next steps. Install via FTP first if missing.
Access cPanel > Databases > phpMyAdmin, then select your WordPress database.

Locate the wp_options table (prefix may vary from default wp_ if customized).


Find template and stylesheet rows. Edit template: set option_value to your theme folder name.


Click Go to save, then repeat for stylesheet. Refresh your site—the new theme activates instantly.
This method has restored access for us in emergencies without data loss. For deeper dives, check our comprehensive guide to WordPress database management with phpMyAdmin.
Liked this? Subscribe to our WordPress YouTube channel for video tutorials, and follow us on Twitter and Facebook for tips.