Skip to content
WordPress3 min read

How to fix "There has been a critical error on this website"

There has been a critical error on this website.

Short answer

"There has been a critical error on this website" appears when PHP stops on a fatal error, usually from a plugin or theme after an update or a PHP version change. The quickest fix is the recovery mode link WordPress emails to the site admin; otherwise find the failing file in debug.log and disable it.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. Common causes
  2. How to fix it
  3. Prevention
  4. On ArabyHost

Since version 5.2, WordPress has a fatal error handler: instead of a white screen, visitors see There has been a critical error on this website. (on Arabic sites, «حدث خطأ فادح في هذا الموقع»). At the same time it tries to email the site admin a message titled something like Your Site is Experiencing a Technical Issue, naming the plugin or theme responsible and including a special Recovery Mode link.

Common causes

  • A plugin or theme update that introduced a bug or a conflict with another plugin.
  • A PHP version upgrade an old plugin doesn’t support, producing errors like Call to undefined function.
  • PHP running out of its allowed memory.
  • A manual edit to functions.php or a plugin file.
  • Missing files after an incomplete update.

How to fix it

1. Use Recovery Mode

Open the admin mailbox and look for the WordPress message (check spam too). Click the link that starts with wp-login.php?action=enter_recovery_mode and log in. In this mode the failing plugin is paused for your session only, so you can go to Plugins, deactivate or update it, then exit Recovery Mode.

If the admin address is outdated, you can send these emails elsewhere by adding this to wp-config.php:

define( 'RECOVERY_MODE_EMAIL', '[email protected]' );

2. No email? Read the error log

In cPanel open Files » File Manager and add to wp-config.php, above That's all, stop editing!:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Reload the page and open wp-content/debug.log. The line starting with PHP Fatal error gives the full path of the file, such as wp-content/plugins/plugin-name/.

3. Disable the plugin or theme

  • Plugin: rename its folder in wp-content/plugins by adding -off to the end.
  • Theme: rename the theme folder in wp-content/themes; WordPress falls back to a default theme if one is installed.
  • Unknown: rename the whole plugins folder, then restore it and reactivate plugins one at a time.

4. Fix the cause based on the message

Message in the log Fix
Allowed memory size ... exhausted Raise memory as in WordPress memory exhausted
Call to undefined function Update the plugin or pick a compatible PHP version
syntax error, unexpected Undo the last manual edit to the file named

To change the PHP version, open Software » MultiPHP Manager, and see the choose a PHP version guide.

5. Turn debugging off

Once fixed, set WP_DEBUG back to false and delete debug.log.

Prevention

  • Update plugins one at a time, and check PHP compatibility before upgrading PHP.
  • Keep the admin email in Settings » General pointed at a mailbox you actually read.
  • Back up before any major update, as in the WordPress backup guide.

On ArabyHost

The Araby AI assistant in the panel reads the error logs, identifies the plugin or file behind the critical error and explains the fix. PHP 8.1 to 8.3 are available in MultiPHP Manager inside cPanel, which opens with one click from the Araby Panel. If the error followed an update and there’s no quick fix, daily backups (JetBackup) let you roll the site back to its state before the update.

FAQ

I didn't get the recovery mode email. What now?

It goes to the admin email in General Settings and may land in spam, or never arrive if the site can't send mail. In that case enable debug.log and disable the failing plugin directly from File Manager.

Does a critical error mean my site was hacked?

Usually not. It's a code error in a plugin or theme, or a clash with the PHP version. If it points to files you don't recognise or appeared after changes you didn't make, scan the site for malware.

Can I just hide the message?

Hiding it doesn't help, because the page won't work either way. The message protects visitors from seeing technical details; the real fix is to disable, update or replace the failing plugin or theme.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.