WordPress Theme Broke the Site: Switch Back to a Default Theme Without Dashboard Access
After a theme change or update the site is broken or the dashboard is unreachable. Switch themes from the database or the files.
Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.
A theme with a coding error can take down the whole site, including the dashboard.
Option 1: Rename the theme folder
- Open File Manager and go to
wp-content/themes. - Rename the active theme's folder, for example
mythemetomytheme-off. - WordPress falls back to a default theme if one is installed (such as one of the "Twenty" themes). Make sure at least one default theme is in that folder.
- Reload the site and dashboard.
Option 2: Change the theme in the database
Open phpMyAdmin, then the table wp_options (the prefix may differ). Edit the rows where option_name is template and stylesheet and set both to the folder name of a default theme.
If you edited functions.php
A missing bracket or semicolon causes an instant fatal error. Open wp-content/themes/yourtheme/functions.php, undo your last change, and save. See our critical error guide.
Prevent it
- Use a child theme or a code-snippets plugin for custom code, not the main theme file.
- Test theme updates on a copy of the site first.
- Keep a backup. See our backup guide.
Related guides
- Writing Clear Error Reports: Screenshots, URLs and Steps
- WordPress Tag and Date Archives Duplicate Content: Settings
- WordPress Permalinks Change: Redirect Old URLs and Avoid 404s
- Error Establishing a Database Connection in WordPress: Full Checklist
Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.