Fix a WordPress critical error without admin access
Find the plugin or theme behind ‘There has been a critical error’ using logs and the File Manager, disable it, and recover.
On this page
- Level
- Intermediate
- Time
- About 20 min
- Steps
- 7
- You’ll finish with
- A working result, checked
7 steps
What you’ll need
- DirectAdmin access
You don’t need to reach wp-admin to fix a broken plugin. The file system and logs are enough. “There has been a critical error on this website”
Step 1: Check for the recovery email
Look in the admin email inbox for ‘Your Site is Experiencing a Technical Issue’ and use its recovery link if present.
Step 2: Enable debug logging
Edit wp-config.php: set WP_DEBUG true, WP_DEBUG_LOG true, WP_DEBUG_DISPLAY false. How to turn on WordPress debugging safely
Step 3: Reproduce and read the log
Reload the site, then open wp-content/debug.log. Find the PHP Fatal error line and the folder in its path.
Step 4: Disable the culprit
Rename that plugin’s folder in wp-content/plugins (or theme in wp-content/themes) by adding -off.
Step 5: Confirm the site works
Reload the front end and log in to wp-admin.
Step 6: Resolve properly
Update, replace or reinstall the plugin, or restore its previous version. Then rename the folder back if you’re reinstating it.
Step 7: Turn debugging off
Set WP_DEBUG back to false and delete debug.log.
Check it worked
The site and wp-admin load, the faulty component is updated or removed, and debugging is switched off.
If something goes wrong
| What happens | What to do |
|---|---|
| No debug.log created | Check the domain error log instead. How to find PHP errors (error logs and display_errors) |
| Error points to wp-includes | Core files may be damaged; re-upload WordPress core, excluding wp-content. |
Where this fits: DirectAdmin hosting explains the control panel every Traxio account uses, with a tour and tutorials.
Spotted something out of date or unclear? Tell us and we’ll fix it.