When WordPress displays a “There has been a critical error on this website” message it’s not always obvious why this has happened and what you’ll need to do to fix the critical error on your WordPress website. This post covers what critical errors are, what causes critical errors, how you can work out what’s causing the critical error (you’ll need access to your WordPress hosting), and some fixes for common causes of critical errors when using WordPress.
What is a critical error?
In the context of WordPress, a critical error typically refers to a serious issue that prevents the website from functioning properly. This often causes the “There has been a critical error on this website” message to appear instead of your website’s pages.
A critical error occurs when WordPress encounters a fatal PHP error that stops the execution of code. It means something in the code is breaking the site before WordPress can load fully.
WordPress has to be able execute it’s code as an application, in totality, to be able to generate page output. As a critical error stops WordPress’ code fully executing, this prevents page output from being generated, and your website’s pages don’t display.
What causes critical errors in WordPress?
There are a lot of different causes to critical errors in WordPress but they all have the same underlying meaning:
The WordPress application errors, and can’t execute it’s code in full.
Common Causes of Critical Errors
Plugin conflicts (e.g., incompatible or poorly coded plugins)
A plugin conflict happens when two or more plugins (or a plugin and the theme/core WordPress) are incompatible in some way, causing unexpected behaviour or site errors.
Instead of working together smoothly, the plugins:
- Compete for the same functions or hooks
- Load conflicting scripts or styles
- Override each other’s actions
- Use outdated or poorly coded PHP
This can lead to anything from layout issues to site crashes or critical errors.
Theme errors (especially after updates or customisation)
A theme error in WordPress refers to a problem caused by the active theme’s code, which breaks part or all of the website. It can cause anything from styling issues to critical errors that bring down the whole site.
Themes control:
- Layout
- Styling (CSS)
- Templates (header, footer, archive pages, etc.)
- Sometimes even functionality via custom functions or integrations
When something goes wrong in this code, it can prevent WordPress from executing correctly, and when this happens a critical error message can be displayed.
PHP syntax errors
A PHP syntax error is a coding mistake that violates the rules of the PHP language. When this happens, PHP cannot parse the file, and the script crashes — often resulting in a critical error or white screen of death (WSOD) in WordPress.
In WordPress, these often occur in:
- functions.php
- Custom plugin files
- Manually added code snippets
- Theme template files
Syntax errors can also occur as a product of changing PHP versions. The syntax of PHP is, in some cases, version specific. If you update your PHP version and your plugins or theme (or both) aren’t compliant with the version of PHP you bring in to effect, this can bring syntax errors in to effect.
Outdated PHP version (conflicting with plugin/theme requirements)
An outdated PHP version in WordPress refers to running your website on an old or unsupported version of PHP (the server-side language that powers WordPress).
Older PHP versions may lack performance improvements, essential security patches, and compatibility with newer WordPress core functions, themes, and plugins.
This can lead to site slowdowns, critical errors, or incompatibility issues when newer code relies on functions not available in outdated PHP versions.
Missing or corrupt files (e.g., core WordPress files, plugin files)
Missing or corrupt files in WordPress refer to essential core, theme, or plugin files that are either accidentally deleted, incomplete, or damaged due to failed updates, malware, or file permission issues.
When these files are unavailable or unreadable, WordPress may be unable to load properly, resulting in broken layouts, missing functionality, or critical errors that prevent the site from displaying or operating as expected.
Exhausted memory limit (PHP memory usage hits limit)
An exhausted memory limit occurs when a WordPress site exceeds the amount of memory allocated to PHP by the server.
This happens when plugins, themes, or processes consume more memory than allowed, leading to errors such as “Allowed memory size exhausted” or critical errors. It’s often triggered by heavy plugins (like page builders or backup tools), poorly optimised code, or resource-intensive operations like image processing or large imports.
Diagnosing WordPress critical errors
Working out what’s causing the critical error is the key to fixing the critical error. To do this, you’d normally enable debugging in WordPress, then examine error logs. The error being written to these logs usually gives you an idea what’s causing the problem, which leads to a course of action to arrive at a fix. WordPress’ debugging mode is often referred to as wp debug.
Enabling wp debug
You can enable wp debug using your site’s wp-config.php file, so you’ll need access to the file system of your hosting to be able to access and modify this file.
In the document root of your domain, locate the wp-config.php file, then edit it:

Then change this line:
define( 'WP_DEBUG', false );

To this:
define( 'WP_DEBUG', true );

Then save your changes:

In many cases, this will result in error messages being displayed on your wp-admin login page, or errors being logged to an error_log file in the document root of your domain, and/or in the wp-admin directory. If you find errors aren’t being logged, you may have to add these directives immediately below define( ‘WP_DEBUG’, true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
You may then need to check the /wp-content/debug.log file to see the errors being logged.
Examining error logs
The error logs may look a little overwhelming. It often helps to break them down a bit to make more sense of them.
Usually, the most recent error will be logged at the bottom of the error log.
Quite often you’ll see an error being logged:
[16-Jul-2025 20:08:09 UTC] PHP Fatal error: Uncaught Error: Call to undefined function fusion_calc_color_brightness() in /home/serenitypamperpa/public_html/wp-content/plugins/fusion-builder/shortcodes/fusion-blog.php:1502
Followed by a stack trace:
Stack trace:
#0 /home/serenitypamperpa/public_html/wp-content/plugins/fusion-builder/inc/class-fusion-builder-element.php(112): FusionSC_Blog->add_styling()
#1 /home/serenitypamperpa/public_html/wp-content/plugins/fusion-builder/shortcodes/fusion-blog.php(102): Fusion_Element->__construct()
#2 /home/serenitypamperpa/public_html/wp-content/plugins/fusion-builder/shortcodes/fusion-blog.php(1996): FusionSC_Blog->__construct()
#3 /home/serenitypamperpa/public_html/wp-content/plugins/fusion-builder/fusion-builder.php(570): require_once('/home/serenityp...')
#4 /home/serenitypamperpa/public_html/wp-content/plugins/fusion-builder/fusion-builder.php(1398): FusionBuilder->init_shortcodes()
#5 /home/serenitypamperpa/public_html/wp-content/plugins/fusion-builder/fusion-builder.php(200): FusionBuilder->includes()
#6 /home/serenitypamperpa/public_ in /home/serenitypamperpa/public_html/wp-content/plugins/fusion-builder/shortcodes/fusion-blog.php on line 1502
The error being logged is the pertinent part, the “stack trace” is a backtrace of the function calls leading up to the error.
The line that starts with “PHP Fatal error” is the one you’ll find most beneficial.
In the example used above, from the file path:
/home/serenitypamperpa/public_html/wp-content/plugins/fusion-builder/shortcodes/fusion-blog.php
You can tell that it’s the fusion builder plugin that’s erroring:
/wp-content/plugins/fusion-builder
Disabling this plugin might fix the error, but as the fusion builder is a page builder, disabling this might also make the appearance of your site’s pages change. Disabling the erroring component isn’t always an option due to implications of this nature.
Common WordPress critical errors and their fixes
There is a degree of commonality in the types of error that can be logged. You can use the logged error, and the path (as outlined above) to establish what is erroring and how.
Allowed memory size exhausted
Error Example:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /public_html/wp-includes/functions.php on line 123
What the allowed memory size exhausted error means
Your WordPress site has hit the PHP memory limit, usually due to a heavy plugin, theme, or process that needs more memory than the server allows.
How to fix the allowed memory size exhausted error
Increase the PHP memory limit by adding this line to your wp-config.php:
define('WP_MEMORY_LIMIT', '256M');
If that doesn’t work, check your hosting account for a php ini manager, then locate the memory_limit value, and increase it accordingly (don’t omit the M or G from the end of the value!).
Uncaught Error: Call to undefined function
Error Example:
Fatal error: Uncaught Error: Call to undefined function my_custom_function() in /wp-content/themes/mytheme/functions.php on line 42
What the Uncaught Error: Call to undefined function error means
The code is trying to use a function that doesn’t exist. This could be due to a typo, a missing plugin, or a file not being included correctly.
How to fix the Uncaught Error: Call to undefined function error
There are multiple causes to this problem, so you may need to carry out one of the following:
- Reinstall the problematic component (the plugin, the theme, or WordPress core)
- Apply pending updates (you may need to license paid plugins and themes to obtain updates)
- Ensure a recent version of PHP is being used
- Correct file permissions
- Ensure any required plugins are active
- Double-check for typos in the function name if a custom theme is erroring
Cannot redeclare function or class
Error Example:
Fatal error: Cannot redeclare my_custom_function() (previously declared in /wp-content/plugins/plugin-a/functions.php:10) in /wp-content/plugins/plugin-b/functions.php on line 12
What the cannot redeclare function or class error means
Two plugins or pieces of code are trying to define the same function or class, which causes a collision.
How to fix the cannot redeclare function or class error
- Deactivate one of the conflicting plugins.
- If you’re adding custom code, wrap the function in a conditional:
if (!function_exists('my_custom_function')) {
function my_custom_function() {
// code
}
}
Syntax error, unexpected…
Error Example:
Parse error: syntax error, unexpected '}' in /wp-content/themes/mytheme/functions.php on line 27
What the syntax error, unexpected… error means
There’s a typo or formatting mistake in your PHP code, such as a missing semicolon, unmatched brackets, or incorrect structure.
This error can be a PHP version specific issue, as PHP syntax can vary between versions.
How to fix the syntax error, unexpected… error
If you’re using a custom theme, or PHP snippets you may need to disable the them or code snippets plugin at file level by renaming it’s folder to bring your WordPress into a functional state. You’ll then need to examine the theme files or PHP snippets and correct any syntax errors.
If you’re not using any custom code, you’re likely to have been affected by a PHP version change. Decrease PHP versions in your hosting until the site functions. Then login to your WordPress and apply all updates (you may need to license paid plugins and themes to obtain updates). Once all updates are applied, increase the PHP version to the most recent you’re able to without the site erroring.
Cannot modify header information – headers already sent / Output already started
Error Example:
Warning: Cannot modify header information - headers already sent by (output started at /wp-content/themes/mytheme/functions.php:2) in /wp-includes/pluggable.php on line 1416
What the cannot modify header information – headers already sent / Output already started error means
This error means that something on your site (usually a theme or plugin) has started sending output before WordPress sends HTTP headers.
HTTP headers must be sent first, before anything else like page content, redirects, or cookies. If something (even a hidden space) is sent too early, PHP can’t send the headers properly and shows this warning.
How to fix the cannot modify header information – headers already sent / Output already started error
You’re going to have to start disabling parts of your WordPress until it begins to function. You can disable themes and plugins by renaming their folders using the file manager in your hosting. For example you might change this:
/wp-content/themes/avada
To:
/wp-content/themes/avada_disabled
Or this:
/wp-content/plugins/revslider
To:
/wp-content/plugins/revslider_disabled
It’s advisable to incrementally disable plugins and themes so that you know what’s causing the error.
Often this error is caused by a new version of WordPress being used with older plugin or themes, so once you’ve got your WordPress into a functional state, update the plugin or theme you’ve disabled, or install the most recent version.
WordPress Critical Error – FAQ
What does “There has been a critical error on this website” mean in WordPress?
This message indicates that WordPress encountered a fatal PHP error that prevents it from loading properly. It usually results from a plugin conflict, theme error, missing file, or incompatible PHP version.
What causes a WordPress critical error?
Common causes include plugin or theme conflicts, outdated PHP versions, missing or corrupt files, exhausted memory limits, and syntax errors in PHP code.
How do I find out what’s causing the critical error?
Enable WordPress debugging by setting define( ‘WP_DEBUG’, true ); in your wp-config.php file. Check the /wp-content/debug.log file or your hosting control panel’s error logs to identify the source.
Can I fix a WordPress critical error without logging in?
Yes. Use your hosting file manager or FTP to disable plugins or themes by renaming their folders inside /wp-content/plugins/ or /wp-content/themes/.
Will disabling a plugin or theme fix the critical error?
It might. If a plugin or theme is causing the problem, disabling it can bring your site back online. You can then update it or replace it with a compatible version.
Should I update my PHP version?
Yes, but only after confirming that your plugins and theme support it. Running an outdated version of PHP can cause compatibility issues and security risks.