How to Fix “There Has Been a Critical Error on This Website” in WordPress
When you see the message “There has been a critical error on this website” on your WordPress site, it means there is a PHP error. But instead of showing the exact PHP error, WordPress hides the details to avoid confusion for visitors.

This message is meant for developers to identify and fix the issue. If you’re facing this problem, follow these steps to find the error and resolve it:
Step 1: Enable Debug Mode
Debug mode helps you see the actual PHP error causing the problem. Here’s how you can enable it:
- Log in to Your Hosting Control Panel
- Use cPanel, Plesk, or any control panel provided by your hosting service.
- No Control Panel? Use FTP or SSH
- If you don’t have a control panel, use an FTP client (like FileZilla) or SSH to access your website files.
- Go to the Website Root Folder
- Navigate to the root folder of your website. This is usually called
public_html
.
- Navigate to the root folder of your website. This is usually called
- Open the
wp-config.php
File- Look for the
wp-config.php
file and open it in a text editor.
- Look for the
- Add the Debug Code
- Add the following line to the file:php

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

Step 2: Check the Error Message
After enabling debug mode:
- Reload your website.
- You will now see the actual PHP error displayed on the page.
Step 3: Fix the Issue
- Read the error message to understand what’s wrong.
- Common issues might include:
- Missing files.
- Plugin or theme conflicts.
- Deprecated or incompatible PHP code.
Step 4: Look for Solutions
Once you identify the error, search online for solutions. You can find many guides and resources to resolve common PHP issues.
By following these steps, you can troubleshoot and fix the critical error on your WordPress site. If you’re unable to resolve the issue, consider reaching out to a developer or your hosting provider for support.
Leave comment what error is showing , We will back to you soon as possible .