How do I change my WordPress theme from the database? Print

  • 0

If you can't reach the dashboard, switch themes in phpMyAdmin. First, know the folder name of a working theme (e.g. twentytwentyfour) in wp-content/themes.

  1. In cPanel open phpMyAdmin and select your WordPress database.
  2. Open the wp_options table and use search to find the rows where option_name is template and stylesheet.
  3. Edit both rows and set option_value to the working theme's folder name.
  4. Save and reload your site.

Note the table prefix may differ from wp_; check wp-config.php. This is handy when a broken theme causes a white screen. Once you can log in, switch themes normally under Appearance > Themes. Need a hand? Open a ticket.


Was this answer helpful?

« Back