Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Have you received the “there has been a critical error on this website” error message on your WordPress website? Do not panic, as this guide offers you a relatively easy fix.

Step 1: Enable Debug Mode

As I mentioned, the first step to fixing the “there has been a critical error on this website” WordPress error is enabling the WordPress to debug mode.

Follow the steps below to enable debug mode in WordPress.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Use an FTP client like FileZilla to FTP to your website hosting site. If you use FileZilla, you can use Quickconnect at the top of the app.

    Enter the IP address of your hosting account in the Host files, then enter your FTP account Username and password.

    Finally, enter the port number as 22 (usually for sFTP), then click Quickconnect.
Step 1 Fix "There Has Been A Critical Error On This Website" WordPress Error: Enable Debug Mode In WordPress
  1. Once FileZilla successfully connects to your hosting account, click the main folder. Then, on the details pane, right-click wp-config.php and select View/Edit.

    FileZilla will ask you to select a program to
Step 1 Fix "There Has Been A Critical Error On This Website" WordPress Error: Enable Debug Mode In WordPress
  1. From the list displayed, click Notepad, then click OK. The wp-config.php file will open in a textile.
  1. When the wp-config.php file opens in notepad, press Ctrl and F keys simultaneously, then search WP_DEBUG.
  1. Then, edit the line define(‘WP_DEBUG’, false); – change false to true. When you finish, the line should look like this…
define('WP_DEBUG', true);
  1. Beneath define(‘WP_DEBUG’, true); – copy and paste the following codes…
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );
These two lines of codes MUST be below define(‘WP_DEBUG’, true);. If you place the above codes anywhere else, WordPress will NOT enable the debug mode.

When you finish adding the codes that enable debug mode in WordPress, the section of the wp-config.php file you edited will look like the highlighted section of mine below…

Popular on Amazon
Sale
Logitech MK270 Full Size Wireless Keyboard and Mouse Combo - Black | Full size keyboard with spill-resistant design, compact ambidextrous mouse, connect via single included USB-A Nano Receiver
  • Reliable Plug and Play: The USB receiver provides a reliable wireless connection up to 33 ft (1), so you can forget about drop-outs and delays and you can take it wherever you use your computer
  • Type in Comfort: The design of this keyboard creates a comfortable typing experience thanks to the low-profile, quiet keys and standard layout with full-size F-keys, number pad, and arrow keys
  • Durable and Resilient: This full-size wireless keyboard features a spill-resistant design (2), durable keys and sturdy tilt legs with adjustable height
  • Long Battery Life: MK270 combo features a 36-month keyboard and 12-month mouse battery life (3), along with on/off switches allowing you to go months without the hassle of changing batteries
  • Easy to Use: This wireless keyboard and mouse combo features 8 multimedia hotkeys for instant access to the Internet, email, play/pause, and volume so you can easily check out your favorite sites
The first line of code enables the WordPress debug mode. Then, the second line stops error messages displaying on your website’s front end. Finally, the third line creates a file called debug.log and saves all error messages in the file. In the next section, you’ll use the debug.log file to find out what is causing the “there has been a critical error on this website” error.
  1. Finally, to enable WordPress debug mode, save the wp-config.php file, then close it.
  2. When you wp-config.php, FileZilla will display a message informing you that the file has changed.

    On the popup window, check the Finish editing and delete local file checkbox. Then, click Yes – FileZilla will upload the edited file to the server and delete the downloaded local copy.

    You have now enabled the WordPress debug mode for your website. Proceed to step 2 below to use the debug.log file to find out what is causing the “there has been a critical error on this website” error.

Step 2: Use the Debug.log File to Find out What is Causing the Error

Now that you’ve enabled the WordPress debug mode, the next step is to use the debug.log file to figure out what is causing the “there has been a critical error on this website” error.

To open the debug.log file, follow the steps below.

  1. While still on FileZilla, click the wp-content folder.
  1. Then, on the details pane, right-click debug.log and select View/Edit.
If WordPress does not create the debug.log file in the wp-config folder, contact your hosting provider, as they may have configured the server to save the file somewhere else.
  1. Finally, look through the debug.log file for errors that may be responsible for the “there has been a critical error on this website” error.
As a guide to your troubleshooting, look out for errors logged by plugins. In my case, the culprit was the Elementor plugin. To resolve the problem, I disabled the plugin from the backend since the error message does not allow me to login to the website! For details of how to disable a WordPress plugin via FTP, see the next section.

Step 3: Fix the Problem Causing the Error

Once you have identified the cause of this error message, the next step is to fix it. If a plugin caused the error message, follow the steps below to disable the plugin via the FTP login.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Also popular on Amazon
Sale
Logitech MK345 Full Size Wireless Keyboard and Mouse Combo - Black | Full size keyboard with integrated palm rest, compact right handed mouse, connect via single included USB-A Nano Receiver
  • Dependable wireless connection: Enjoy the reliability and convenience of 2.4 GHz connectivity with your logitech wireless keyboard and mouse combo, wireless range up to 10 meters away at home, or work.
  • Full-Size Wireless Keyboard: Comfortable, quiet typing on a familiar keyboard layout with palm rest, spill-resistant design, and media keys. This wireless keyboard and mouse logitech has easy-access to media keys
  • Plug and Play: MK345 works seamlessly with Windows, macOS, and ChromeOS. Experience hassle-free setup with the logitech mk345 wireless combo and wireless keyboard mouse combo for various operating systems.
  • Long-lasting Battery: The MK345 combo offers a full size keyboard battery life of up to 3 years and a mouse battery life of 18 months (1); batteries included
  • Comfortable Right-handed Mouse: This wireless USB mouse with dongle works well for this wireless mouse and keyboard combo, featuring a contoured shape for all-day comfort and smooth, precise tracking and scrolling for easier navigation.
  1. While still signed in to your hosting account’s FTP, navigate to the /wp-config/plugins folder.
  1. Finally, to disable the plugin that is causing the problem, right-click the plugin’s folder. Then, click Rename.

    You can add “_disable” to the name to rename the folder. It is a good practice to keep the original name so you can easily identify the plugin.
Step 3: Fix The Problem Causing The "There Has Been A Critical Error On This Website" WordPress Error

After fixing the problem that caused the “there has been a critical error on this website” error, you should be able to log in to your WordPress site.

However, before you celebrate with a cup of tea, please follow the steps in the last section below to delete the debug.log file and disable the debug mode.

Step 4: Disable the Debug Mode and Delete the Debug.log File

When you’ve resolved the issue and the “there has been a critical error on this website” error, you MUST delete the Debug.log File.

Also popular on Amazon
Sale
Wireless Keyboard and Mouse Combo, Full Size Silent Ergonomic Keyboard and Mouse, Long Battery Life, Optical Mouse, 2.4G Lag-Free Cordless Mice Keyboard for Computer, Mac, Laptop, PC, Windows
  • 【Ergonomic Wireless Keyboard Mouse 】: Wireless ergonomic keyboard is equipped with adjustable height tilt legs to increase comfort and prevent your wrists injury when typing for a long time. The full size wireless keyboard with numeric keypad and 12 multimedia shortcut keys, such as play/ pause, volume increase and decrease, and email, to help you improve work efficiency
  • 【Stable & Reliable Wireless Connection】: This wireless keyboard and mouse combo share the same USB receiver(stored in the mouse), and they can also be used separately. Plug & play, no need to download any software, 2.4 GHz wireless provides a powerful and reliable connection up to 33 feet(10m) without any delays.You can enjoy the convenience and freedom of wireless connection at home or at work
  • 【Comfortable Optical Mouse】: This compact lightweight wireless mouse features a hand-friendly contoured shape for all-day comfort, and smooth, precise tracking.1600 DPI to meet your daily needs. Perfect for home & office work and entertainment
  • 【Long Battery Life】: Up to 365 Days of battery life for keyboard and mouse wireless, say goodbye to the hassle of charging cables and replacing batteries. After 10 minutes of inactivity, the wireless keyboard mouse combo will automatically go into sleep mode to save energy. The wireless keyboard requires one AAA battery, and the wireless mouse requires one AA battery.
  • 【Less Noise, More Quiet Keys】: Soft membrane keys provide a quiet and comfortable typing experience, So you can type with confidence on a wireless keyboard crafted for comfort, precision and fluidity. The wireless mouse adopts silent micro-motion technology, which is almost completely silent when clicked. No more concerns about disturbing others.

Then, disable the WordPress debug mode.

  1. While still on FileZilla, navigate to the root of your website’s folder. Then, open the wp-config.php file and delete the following lines.
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );
  1. Then, modify define(‘WP_DEBUG’, true); to define(‘WP_DEBUG’, false);
  2. When you finish, the section of the wp-config.php file you modified should have the line highlighted in my screenshot below…
  1. Save the file and close it; then, FileZilla prompt, check the Finish editing and delete local file checkbox; then, click Yes.
  1. Finally, navigate to the wp-config folder and delete the debug.log file.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Frequently Asked Questions

1. What causes the critical error on WordPress?

The primary cause of the “there has been a critical error on this website” error on WordPress is “PHP Fatal error”. This error cold be triggered by problems with plugins or a custom code you add to your site.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
2. How do you resolve the “there has been a critical error on this website” error?

The first step to resolving the “there has been a critical error on this website” error on WordPress is to roll back any recent change you made to your website.

For example, if you installed a plugin before your website displayed this error message, FTP to your website’s hosting account. Then, navigate to \wp-content\plugins folder and rename the folder of the plugin you installed before your site displayed the error.

However, if you did not make any recent change, follow the steps below to determine what may have caused the problem:

i) Enable WordPress debug mode. Then, enable debug logging
ii) Open the debug.log file in the \wp-content folder
iii) Scan through the log file for any errors that may have caused the error message.

As a guide, if you see a line that has “PHP Fatal error”, it is likely to be the culprit
iv) Finally, fix the problem. If a plugin caused the “there has been a critical error on this website” error message, disable the plugin by renaming its folder.

3. How do I turn off PHP warnings in WordPress?

FTP to your website host’s account to turn off PHP warnings in WordPress. Then, open the wp-config.php file in your website’s root folder.

Finally, locate the line below and change true to false; save the changes to your file and upload the modified file.

define(‘WP_DEBUG’, true);

Also popular on Amazon
Sale
Logitech MK335 Full Size Quiet Wireless Keyboard Mouse Combo - Black/Silver | Full size low-profile quiet keyboard, full size ambidextrous contoured mouse with rubberized side grips, Windows ChromeOS
  • The keyboard's sleek and stylish design features low-profile, whisper-quiet keys that provide a comfortable typing experience, suitable for those seeking a Logitech wireless keyboard and mouse combo or quiet keyboard enthusiasts
  • Logitech advanced 2.4 GHz wireless connectivity gives you the reliability of a cord plus wireless convenience; suitable for a keyboard and mouse wireless setup with fast data transmission, virtually no delays or dropouts, and wireless encryption
  • The ambidextrous portable mouse with plug-and-forget nano-receiver storage integrates seamlessly into any wireless keyboard mouse combo, letting you stay connected as you roam around your home, in the office, and all points in between
  • You can go up to 24 months for the keyboard and up to 12 months for the mouse without the hassle of changing batteries. The wireless mouse and keyboard combo puts power management in your hands. Battery life varies with use and conditions
  • Want to play your favorite movie, skip a boring song, or jump to Taobao? It's all at your fingertips with the logitech keyboard wireless and 11 hot keys plus 4 programmable F-keys for instant multimedia access
4. How do I disable WordPress debugging?

Follow the steps below to disable WordPress debugging:

i) FTP to your WordPress website hosting account
ii) Open the wp-config.php file on the root of your website account
iii) Locate the line below and change true to false.

define(‘WP_DEBUG’, true);

iv) Finally, save the wp-config.php file.

5. How can I check the PHP version of my WordPress site?

To Check the PHP version of your website, follow the steps below:

i) Login to your website as admin via YourDomainName.com/wp-admin
ii) Then, on the left pane of the WordPress dashboard, hover over Tools and select Site Health.
iii) When Site Health opens, click the Info tab. Then, scroll down to the Server section and expand it.
iv) WordPress will display the PHP version under “PHP version.”

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Conclusion

If your WordPress site displays the “there has been a critical error on this website”, you’ll not be able to sign in to the backend. This will understandably lead to panic.

Also popular on Amazon
Logitech MK540 Full Size Advanced Wireless Keyboard and Mouse Combo | Full size quiet keyboard with number pad & integrated palm rest, full size ambidextrous mouse, includes USB-A Nano Receiver
  • Precision Typing: An instantly familiar experience, type with ease and comfort on this full-size wireless keyboard, featuring reduced noise, palm rest, spill-resistant design (1), adjustable tilt legs
  • Built For Comfort: The sleek combo's wireless mouse features an ambidextrous shape and soft rubber side grips that fit comfortably in your palm, as well as enhanced tracking and precise cursor control
  • Long-Lasting Autonomy: The wireless keyboard and mouse set come with long-lasting battery life, with the keyboard lasting up to 36 months and the wireless mouse for up to 18 months (3)
  • Customized Control: Enhanced productivity at your fingertips, the computer keyboard comes built with convenient, essential hotkeys providing direct access to media, calculator, battery check functions
  • Wireless Freedom: Plug-and-play your keyboard and mouse with the mini Logitech Unifying USB receiver, for a reliable wireless connection up to 33 ft away from your PC or laptop (2)

As I have discussed extensively in this guide, what usually causes this error is “PHP Fatal error”. Furthermore, this error may be triggered by a plugin malfunction.

Since so many plugins (or even other things) may trigger this error, the best way to approach solving the problem is to enable WordPress debug logging. Then, review the debug.log file to find out what is causing the problem.

Once you find out the culprit, you can then fix it. For example, if a plugin triggered the error, you can fix the problem by disabling the plugin via FPT.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

I hope you were able to get your website up and running by following the steps in this guide! If you did, click on “Yes” beside the “Was this page helpful” question below.

You may also express your thoughts and opinions by using the “Leave a Comment” form at the bottom of this page.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.