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.

IntermediateAbout 20 minutes7 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”

Steps

  1. 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.

  2. 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

  3. 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.

  4. Step 4: Disable the culprit

    Rename that plugin’s folder in wp-content/plugins (or theme in wp-content/themes) by adding -off.

  5. Step 5: Confirm the site works

    Reload the front end and log in to wp-admin.

  6. 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.

  7. 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 happensWhat to do
No debug.log createdCheck the domain error log instead. How to find PHP errors (error logs and display_errors)
Error points to wp-includesCore files may be damaged; re-upload WordPress core, excluding wp-content.

Popular

Tip: press / to search from any pageSee all results