Nothing can be as worrying as having a ‘Critical Error On This Website’ browser message display for webmasters, turning off potential users/readers/customers. In particular, the most common message, ”there has been a critical error on this website,” is displayed for a few technical reasons (we’ll address a few of them shortly). No matter the steps a webmaster takes, the error still occurs.
Nothing works; some may use the cPanel method to uninstall the active WordPress theme — replace it with a default WordPress Theme, such as Twenty Twenty Four, or first uninstall all the WordPress plugins and reinstall them (one by one) to know the cause of the error. Others may do the same through the FTP Protocol, such as FileZilla or Core FTP, to deinstall/reinstall WP files.
However, no matter their method, the infamous ”there has been a critical error on this website” remains. On that note, the ”Critical Error On This Website” issues can have a variety of causes. However, the problem can usually be traced back to a PHP issue: either your memory limit was exceeded or an error in your code, plugins, or theme. It may also be an issue of database corruption.
With that in mind, it’s also worth noting that the actual ‘Critical Error On This Website’ cause may limit user/admin access privileges to the HTML code. Without access to your WordPress admin area, troubleshooting becomes much more complicated. Fortunately, this guide will discuss the topmost known potential causes of this error and how to fix it by looking at different solutions.
Investigating The Actual Causes For Critical Error On This Website
As mentioned, the “There Has Been A Critical Error On This Website” message, also known as the WordPress White Screen of Death (WSoD), is one of the most common yet alarming errors WordPress website owners and webmasters can encounter. As the name suggests, the White Screen of Death is a website-based error that occurs when a blank white screen replaces your website.
Sometimes, you may see an HTTP 500 error with a warning, “This page isn’t working and cannot handle the request.” Sometimes, it can also occur when you are logged in or attempting to log into your wp-admin. In short, this error makes your site inaccessible to you and visitors. Notwithstanding, WordPress does not provide any additional information about what has caused this error.
Usually, WordPress recommends a few methods to help troubleshoot the cause of these issues. In other words, the issue of “There Has Been A Critical Error On This Website” means an error occurred during the PHP code execution process. This tells you that WordPress failed to load its core or additional functionality provided by the activated plugins, which can challenge the server.
Such an error challenge can be attributed to server-side issues, resource limits, and code-related errors. For instance, if there are any syntax errors in your website’s code, one of the required pieces of code, or even the whole file is missing, it will inevitably lead to WordPress being unable to load any web content. Let’s highlight a few more possible causes of such a critical website error.
Topmost WSoD Errors:
- PHP code-level errors
- Memory limit exhaustion
- Plugin and theme incompatibility
- Failed WordPress Core Files update
- Server-side PHP issues and resource limits
- Incompatible or failed theme/plugin updates
- Corrupted database files, plugins, or theme
- Virus or Malware infections
- Server-access-level issues
In addition, if you have encountered a WordPress critical error while uploading media or performing another specific task, PHP has most likely reached the resource limits configured for it while executing a script. This has led to the server shutting down the current process activity. On that note, we must understand the vital WordPress Core Files and the PHP code execution process.
Demystifying The WordPress Core Files And PHP File Code Execution
As a great platform powering 40% of the Internet, WordPress is the most preferred Content Management System (CMS) by rating. It allows for building dynamic websites without coding skills. This has become possible thanks to the WordPress built-in, or core, functionality, which abstracts away all complications that running a modern database-driven web application can create.
The WordPress Core Files typically do not need to be modified and will only be reinstalled once you update to a new version. WordPress defines what core files need to be loaded and in what order for your website pages to appear in the browser. Any issues encountered during PHP code execution will result in various errors, including the “critical error on this website” message.
In addition to WordPress’ core functionality, how a website functions is also defined by the active theme and various plugins that a website owner chooses to extend the platform’s possibilities. Each additional piece of software installed adds to the complexity of the website, which inevitably results in a higher risk of PHP running into errors during script execution as the amount of code grows.
Therefore, “WordPress Core” encompasses all the foundational files a WordPress website requires to work. The key to understanding the critical errors is knowing how WordPress provides functionality using its core files and combines it with the features provided by the active theme and plugins. You will see a critical error on your website if the code integrity is damaged.
The Simple Steps To Help Fix The ‘Critical Error On This Website’ Issue
Now that you understand the workings of the WordPress Core Files and the PHP code execution process, it’s time to explore a few steps to help you fix the “Critical Error On This Website” issues. As such, to get started with the fundamental steps, ensure that you utilize the WordPress Debugging Mode to help identify the main issues and devise an all-time solution that will fix the error.
Remember, debugging WordPress PHP code is part and parcel of any website design and development project. However, WordPress has specific debug systems for its target marketplace users and potential design webmasters. These debugging systems simplify the process and standardize code across the core, plugins, and themes. For quick fixes, watch the video tutorial guide below.
These WordPress website debugging options usually provide detailed information about errors for non-programmers or general users. Before modifying your website, verify that you have utilized a staging environment. At the same time, before attempting the other steps below, we recommend completely backing up your website database or application software files.
In addition, creating a restore point for your website database files is also essential. On that note, you can look at this page, which describes the various debugging tools on WordPress and how to be more productive in your coding. You’ll also gain a few chops to help you increase your code’s overall quality and interoperability. Below are the general steps for webmasters to consider.
Step #1: Enable And Utilize The Debugging Mode In WordPress
You can disable the malfunctioning plugin or switch to another theme. Unfortunately, as mentioned, a ‘Critical Error On This Website’ can sometimes prevent users or webmasters from accessing the WordPress admin area. In such cases, all website debugging operations must be performed from the command line or through your web hosting file manager (cPanel Dashboard) interface.
Remember, checking website error logs to understand what has caused the issues is of primary importance when troubleshooting the “There has been a critical error on this website” message in WordPress, especially when your website has become entirely inaccessible. Enabling debugging in WordPress allows you to make WordPress display what errors have been encountered.
In particular, you’ll notice the errors discovered during PHP code execution on the HTML page or write all log entries to a separate file on the server. Debugging in WordPress can be enabled by setting the WP_DEBUG constant in the wp-config.php file to true. This will enable the debug mode, and WordPress will start writing all PHP errors and warnings on the web page generated in the browser.
Displaying fatal PHP errors on web pages is the default behavior in debug mode. However, you can make WordPress write everything into a separate log file. Set the WP_DEBUG_DISPLAY constant to false and enable the WordPress debug log. WordPress now will write all error and warning messages to a file named debug.log inside your WordPress content directory.
Step #2: Identify The Underlying ‘Critical Error On This Website’ Issue
Once you have enabled debugging in WordPress, check the error message displayed on the website or written to the debug log. The error message will help you identify the underlying issue behind the “There has been a critical error on your website” message on your website. The PHP Error Reporting will reference WordPress core files, your active theme, or one of the plugins.
Review the log entries carefully to understand what kind of an issue you are dealing with. It can be one of the files or PHP extensions missing, a syntax error, or you may notice that the PHP memory limit was reached. For example, if the PHP memory limit is reached and your WordPress website cannot load, you will see the “There has been a critical error on this website” message.
Sometimes, a message similar to the ‘Critical Error On This Website’ may also be logged. If your current theme is causing issues, you can temporarily switch to the default Twenty Twenty-Four theme. Moreover, each new WordPress installation includes the default Twenty Twenty-Four Theme. However, if the theme is missing, you can download it manually or use WP CLI.
Rename your active theme’s directory in the themes folder inside wp-content. Then, return to your WordPress website’s document root directory and run the wp theme activate command provided by the WordPress command line interface, passing twenty-twenty-four as an argument. Next, investigate the cause of the critical error on your WordPress website.
Step #3: Fix The Originating ‘Critical Error On This Website’ Issue
Depending on what the error message displayed on your website or written to the debug log says after you have enabled debugging in WordPress, you must take different steps to fix the WordPress critical error and restore your website functionality. Follow the instructions provided in the previous section of the guide to address issues related to failed WordPress core updates.
Scan for any virus and malware infections or try to establish server-side PHP issues. Restoring from a backup before the failed update happens might be the best and the easiest way to bring your website back online. Establish if any recent backups are sure to contain a working copy of your website. By all means, the website backup will be a restore point for your website database files.
Furthermore, using the files from the website backup can be much easier than redownloading WordPress core files or manually removing malware. Carefully evaluate the situation to work out the best course of action. Remember that if you do not feel comfortable performing the steps outlined in this guide, it is best to seek assistance from your hosting provider’s technical support team.
In the next step, you’ll realize that failed or incomplete WordPress core, theme, or plugin updates can cause the website files not to be reinstalled correctly, which in turn will cause issues with PHP code execution. When your WordPress website has suffered a failed update, some of its files can be missing or become corrupt.
Step #4: Work On Incompatible Theme And Fix Plugin Updates
Once WordPress attempts to load its core functionality and makes your theme and active plugins execute their code to extend that functionality, PHP encounters fatal errors, which leads to seeing the “There has been a critical error on this website” message. Depending on what component of your website causes the WordPress critical error, you may need to reinstall the WordPress files.
Similarly, if your active theme or one of the active plugins is at fault, you can switch to another theme or deactivate the malfunctioning plugin to troubleshoot the issues. Thereafter, you can reinstall the plugins (one by one) once you stop seeing the critical error message on your WordPress site. This temporary solution will allow you to restore access to the WordPress admin area.
Rename the directory of the malfunctioning plugin to prevent WordPress from loading any files from that folder, making the critical website error disappear if it was the only thing causing issues. Please note that renaming the plugin’s folder is not a proper way to deactivate it, but it will allow you to restore your website’s functionality and load the WordPress dashboard.
At the same time, replacing the WordPress core files or correcting syntax errors is complicated. Therefore, to do things right, we strongly recommend saving a backup of your website before changing any files to avoid creating even more issues.
Step #5: Optimize WordPress Core Files And Restore Backups
If issues have been identified in the WordPress core, you must replace the corrupt or re-download the missing files. You must download the WordPress installation version your website has previously failed to update the core functionality. This way, you can unzip the archive and manually replace individual files or the whole wp-includes and wp-admin folders.
Likewise, you can manually replace the core files in your WordPress installation directory. Download a fresh WordPress installation from wordpress.org and unpack the files. For example, you can download the WordPress 6.0.1 core files in zipped format. Download the archive to the server directly by using the wget command and perform all operations on it from the command line.
Equally important, you can still save the archive to your computer and upload all files to the website via FTP, SFTP, or File Manager. Also, try redownloading core files via the command line interface using the WP core download command. The—skip-content option allows you to skip downloading the default themes and plugins, while—force will overwrite all existing core files.
Related Resource: The Website Application Troubleshooting Guide For Webmasters
Next, regular backups are essential for keeping your WordPress website secure and quickly restoring its functionality in case of a failed update. A WordPress backup plugin like Solid Backups can simplify restoring from a backup. Restoring from a backup is a much easier solution than manually replacing any core, theme, or plugin files. Consider the backups saved by your host.
As such, you will most likely be able to leverage automatic backup restorations. Suppose you only use a WordPress backup plugin. In that case, the restoration process must be performed manually, especially if you see the “critical error on this website” message.
Step #6: Test For Virus Attacks And Malware Infections
On the one hand, Malware Infections are another reason for seeing a critical WordPress error on your website. As the issues that failed updates create, any malicious code added to the WordPress core, theme, or plugin files can cause syntax errors or other problems that will break the normal PHP code execution. On the other hand, various cybercriminals and hackers exist.
They are constantly looking for new ways to exploit known vulnerabilities and gain access to your website to perform malicious actions and carry out network attacks. Your website files and database information can be altered to the point where WordPress will no longer function correctly, leading to various errors, including the infamous “critical error on this website” message.
The approach is very similar to addressing failed WordPress updates. Once you identify the source of the issue, whether it is a plugin, your current theme, or the core files that need to be replaced, you will need to restore the basic functionality of your WordPress to gain access to the admin area. Depending on the scale of the issue and your goals, you may be able to fix problems manually.
For instance, you can replace the infected files or remove all malicious code injections, restore your website from a backup, or rebuild it from scratch. The Solid Backups and the Solid Security Pro plugins will allow you to recover from malware attacks like a pro by providing a way to quickly identify and remove all malware or restore your website from a clean backup in minutes.
Step #7: Investigate Server-Side PHP Issues And Resource Limits
More importantly, these robust website security solutions can help you address all issues at source and never experience any WordPress critical errors by protecting your website from known security threats and ensuring data redundancy. The Website Scan Feature allows you to run scheduled malware and vulnerability scans that alert you should a threat be identified.
With that in mind, it’s worth mentioning that the server-side issues and the limits imposed on the amount of server resources available to your WordPress website can lead to various errors, including the “There has been a critical error on your website” message. How well your server environment is configured and optimized for the specific needs of your website is critical.
Server-side issues related to PHP code execution errors can include an outdated PHP version in use, which means that some new functions can be wholly unsupported or various PHP extensions required by WordPress are missing. This also includes having certain PHP functions that WordPress needs in a disabled mode. The next step is to evaluate your PHP resource usage limits.
Server resource limits can be a severe issue for WordPress website owners, especially on shared hosting plans where you have little to no control over your server environment. The resource usage limits imposed on the amount of memory or CPU time allocated to a particular PHP process can be shallow. Thus, this often results in your WordPress website being unable to function correctly.
The Main PHP Settings:
- Memory Resource Limit. The memory limit defines the maximum amount of memory a PHP process can use.
- Maximum Execution Time. It sets a time limit for executing each script; exhausting it stops further script processing.
- The Upload File Size. The maximum file size determines how big a file can be uploaded to the server through a PHP script.
Note that the PHP settings above can significantly affect your WordPress website’s functionality and performance. So, in other words, it’s essential to note that running too many resource-intensive plugins or custom codes can challenge the allocated PHP resource usage limits. Not unless you are on a shared hosting plan, which does not typically allow you to make changes.
With the help of dedicated server hosting, you can easily/quickly increase all PHP limits for all websites or a particular one, a directory, or even an individual PHP script. You should also be able to switch to another PHP version.
Step #8: Update The PHP Version And Raise Local/Global PHP Limits
If the current PHP version is causing issues, which can happen when it no longer supports some of the new functions required by your WordPress website or when specific extensions are missing, you can update it from your web hosting control panel. If you have a VPS or a dedicated server with a cPanel, you can use a GPU (Graphics Processing Unit) to manage all server-side aspects.
As such, you can manage the server-side aspects of PHP code execution through a graphical user interface. However, most of the time, you can only increase the global limits this way, which means those would be applied to all websites on the server. This is not always an optimal solution, as we want to keep the limits as low as possible while increasing them for specific websites or scripts.
Remember, just like any other server resource limits, PHP limits are in place to protect your server from getting overloaded or exploited. Malicious scripts tend to use many resources, so having PHP limits set as low as your website allows for can be one of the factors protecting your system. You can increase your PHP limits for a certain website by creating a .user.ini file.
Then, you can place the new values there. Each PHP handler follows its order when loading PHP configuration files, but .user.ini typically has a high priority, so all configurations you include there will take effect. Create a .user.ini file in the document root of your WordPress installation or one of the directories. That’s if you would like to increase the limits only for a particular website part.
Step #9: Increase And Check Your PHP Limit Configuration Settings
The next step is to increase and check your PHP resource limit configuration settings. In this case, you can insert the new PHP limits’ values as shown below and save the file. Please note that the values below are included just for illustrative purposes. However, you must be mindful of your server resources and set limits considering all factors.
Consider the following:
memory_limit = 256M;
max_execution_time = 128;
upload-max-filesize - 256M;
To check whether PHP has recognized the new values you have configured, create a PHP info file showing all PHP configuration settings, including the global values and the values set for your website. Create a file named phpinfo.php in your website’s document root and insert the execution code into it.
Example:
<?phhp
phpinfo( );
?>
Alternatively, run a line of code if you are logged in to your website through SSH. It will create a phpinfo.php file and adjust its permissions if needed.
Consider the following:
echo ''<?php phpinfo(); ?>''> phpinfo.php ; chown $(stat -c %U .).
phpinfo.php
Load the PHP information page by opening yourwebsite.com/phpinfo.php in your browser, where yourwebsite.com is the domain name of your WordPress website. You will see the new limits you have applied to your website under Local Value.
| Directive | Local | Master |
| memory_limit | 256M | 64M |
| max_execution_time | 128 | 30 |
| upload_max_filesize | 256M | 48M |
Remember, the WordPress critical error can have a variety of causes, though the issue often involves PHP. Either the PHP memory limit has been exceeded, or your plugins or themes are having problems. The quickest way to fix the problem is to roll back your website if you have a backup. However, you can try other methods (as discussed above) to fix/resolve these errors/issues.
From raising the PHP memory limit to identifying and disabling a problem plugin, choose the one that works best for you. Troubleshooting may require trying a few different things but don’t get discouraged if you can’t fix it yourself. You can always get WordPress support from your web host. Consult the Web Tech Experts and other professional WordPress designers when in doubt.
With enterprise-level integrations and management, you can save time and costs and maximize website performance. If errors often plague your website, check out this guide exploring the 65+ most common WordPress errors for more helpful information. If all goes well, back up the entire website, fix broken parts, and effectively manage content (pages/posts) and database files.
Step #10: Get A Customized WordPress Support If All Else Fails
If you’ve tried all these options and nothing is working, you have a real problem. However, you can always contact your web host for help identifying and fixing the issue. As a rule of thumb, a good web hosting solution provider will support you to get your site up and running again. Along with every plan, the most suitable/preferred web host provider offers live WordPress support 24/7.
With the support tools integrated into your cPanel dashboard, getting help anytime is only a click away. Response times are fast — often less than two minutes — so you won’t be waiting around with a down site for hours or days. So, how does our Web Tech Experts team support scope compare to this particular issue? We offer technical support when errors appear on your website.
This includes the titular critical error investigation, prompt fixer solutions to the issues, and ongoing management support. We can help you identify which files or plugins are causing the problem. While you need to fix the issue either yourself or with the help of a developer, our support team is happy to offer instructions on how to do so (for instance, how to access the file through FTP).
In Conclusion;
Given the ever-evolving cloud computing technology landscape, getting a “There Has Been A Critical Error On This Website” issue is quite prevalent with many digital online businesses and design webmasters. The “There has been a critical error on this website” message in WordPress, also known as the white screen of death, appears on your website when PHP has encountered errors.
Such errors can occur during code execution on the server. Therefore, since many dynamic things can cause the problem, it’s worth noting that you should check the error log on your server. If you can’t find the log, don’t hesitate to consult your web host. To fix the critical error on this website and bring it back online, you need to identify the issue’s source and restore the core code files’ integrity.
Other Related Resource Reference Topics:
- How To Access The WP-CLI Common Commands
- Website Security | Top #6 Steps To Secure Your Web Business
- What Is Website Optimization? 10 Best Tools For Content SEO
- How Website Links Management Is Done | #10 Key Methods
- An Introduction To HTML For Beginner Design Webmasters
In the meantime, enable wp_debug and wp_debug_log, and after an error, look at wp-content/debug.log to see if anything gets logged there. Equally important, the Solid Backups and the Solid Security Pro Plugin are essential tools that provide industry-leading solutions for application-level security and data recovery. Have your WordPress website protected from security breaches.
Finally, our experienced WordPress system administrators can help you quickly identify the cause of the “Critical Error On This Website” issues and address and fix all failure notices. Our Webtechex Team also helps mitigate all vulnerabilities while saving regular backups to significantly reduce the risk of experiencing such critical errors. We wish you all the best in your work!
