{"id":30343,"date":"2022-12-15T04:09:40","date_gmt":"2022-12-15T04:09:40","guid":{"rendered":"https:\/\/supporthost.com\/?p=30343"},"modified":"2026-03-16T16:02:24","modified_gmt":"2026-03-16T15:02:24","slug":"critical-error-wordpress","status":"publish","type":"post","link":"https:\/\/supporthost.com\/critical-error-wordpress\/","title":{"rendered":"How to fix the &#8220;There Has Been a Critical Error on Your Website&#8221; error"},"content":{"rendered":"\n<p>When you try to access your WordPress website, have you ever come across an error page that says \u201cThere has been a critical error on your website?\u201d<\/p>\n\n\n\n<p>In this article, <em>How to fix the &#8220;There Has Been a Critical Error on Your Website&#8221; error<\/em>, we will see how to quickly understand what is causing this critical error in WordPress.<\/p>\n\n\n\n<p>In this way, you&#8217;ll be able to get your site back up and running as soon as possible.<\/p>\n\n\n\n<p>Let&#8217;s get started!&#8221;<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#there-has-been-a-critical-error-on-your-website-what-is-this-error\">\u201cThere has been a critical error on your website\u201d- what is this error?<\/a><\/li><li><a href=\"#what-causes-the-word-press-critical-error\">What causes the WordPress critical error?<\/a><\/li><li><a href=\"#how-to-identify-and-fix-the-error\">How to identify and fix the error<\/a><ul><li><a href=\"#activating-word-press-debug-mode\">Activating WordPress debug mode<\/a><ul><li><a href=\"#identifying-the-error-on-screen-display\">Identifying the error (on-screen display)<\/a><\/li><li><a href=\"#consulting-the-debug-log-file-to-identify-the-error\">Consulting the debug.log file to identify the error<\/a><\/li><\/ul><\/li><li><a href=\"#checking-the-error-log-file\">Checking the error_log file<\/a><\/li><\/ul><\/li><li><a href=\"#word-press-critical-error-solutions-to-common-causes\">WordPress Critical Error: Solutions to Common Causes<\/a><ul><li><a href=\"#disabling-plugins\">Disabling Plugins<\/a><\/li><li><a href=\"#restoring-the-default-theme\">Restoring the Default Theme<\/a><\/li><li><a href=\"#changing-the-php-version\">Changing the PHP Version<\/a><\/li><li><a href=\"#increasing-the-php-memory-limit\">Increasing the PHP Memory Limit<\/a><\/li><li><a href=\"#restoring-a-word-press-backup\">Restoring a WordPress Backup<\/a><\/li><\/ul><\/li><li><a href=\"#conclusion\">Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"538\" src=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/11\/there-has-been-a-critical-error-on-your-website-1024x538.png\" alt=\"There Has Been A Critical Error On Your Website\" class=\"wp-image-30927\" srcset=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/11\/there-has-been-a-critical-error-on-your-website-1024x538.png 1024w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/11\/there-has-been-a-critical-error-on-your-website-300x158.png 300w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/11\/there-has-been-a-critical-error-on-your-website-768x403.png 768w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/11\/there-has-been-a-critical-error-on-your-website-120x63.png 120w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/11\/there-has-been-a-critical-error-on-your-website.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"there-has-been-a-critical-error-on-your-website-what-is-this-error\">\u201cThere has been a critical error on your website\u201d- what is this error?<\/h2>\n\n\n\n<p>This error message is an error notification that appears on WordPress websites.<\/p>\n\n\n\n<p>When we try to access the back-end of our site or even just visit it, all we see is a screen with this message, as shown here:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"781\" height=\"168\" src=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/there-has-been-a-critical-error-on-your-website.png\" alt=\"There Has Been A Critical Error On Your Website\" class=\"wp-image-30928\" srcset=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/there-has-been-a-critical-error-on-your-website.png 781w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/there-has-been-a-critical-error-on-your-website-300x65.png 300w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/there-has-been-a-critical-error-on-your-website-768x165.png 768w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/there-has-been-a-critical-error-on-your-website-120x26.png 120w\" sizes=\"auto, (max-width: 781px) 100vw, 781px\" \/><\/figure>\n\n\n\n<p>In some cases, the error may only appear after certain actions.<\/p>\n\n\n\n<p>However, when it does happen, it interrupts website navigation and also prevents us from accessing the admin area.<\/p>\n\n\n\n<p>The alert message may vary slightly, and the text could be as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>There has been a critical error on your website. Please check your site admin email inbox for instructions.<\/code><\/pre>\n\n\n\n<p>The message includes a link that directs you to WordPress <a href=\"https:\/\/wordpress.org\/support\/article\/faq-troubleshooting\/\" rel=\"noopener\">FAQs<\/a> about some of the most common errors, including the <a href=\"https:\/\/supporthost.com\/white-screen\/\">WordPress white screen<\/a> (<em>also known as the white screen of death<\/em>).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-causes-the-word-press-critical-error\">What causes the WordPress critical error?<\/h2>\n\n\n\n<p>The issue &#8216;There has been a critical error on your website&#8217; is also referred to as the &#8216;WordPress critical error&#8217; because it prevents access to the site and the admin area.<\/p>\n\n\n\n<p>The error can occur due to an issue with a plugin or theme and generally has its root in a problem with a <strong>PHP script<\/strong> that gets interrupted.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"767\" src=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/debug-there-has-been-a-critical-error-on-your-website.png\" alt=\"Debug There Has Been A Critical Error On Your Website\" class=\"wp-image-30929\" srcset=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/debug-there-has-been-a-critical-error-on-your-website.png 1024w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/debug-there-has-been-a-critical-error-on-your-website-300x225.png 300w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/debug-there-has-been-a-critical-error-on-your-website-768x575.png 768w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/debug-there-has-been-a-critical-error-on-your-website-84x63.png 84w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Since this is one of the most common errors in WordPress, developers have introduced a feature that <strong>sends an email<\/strong> to help identify the cause of the error.<\/p>\n\n\n\n<p>The email is sent to the administrator&#8217;s address of the WordPress site and contains error details such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>the type of error \u2013 for example, a <strong>parse error<\/strong> (a type of PHP error).<\/li>\n\n\n\n<li>the location of the error \u2013 it specifies the file and the <strong>line<\/strong> of code where the error was encountered.<\/li>\n\n\n\n<li>the error message \u2013 it helps us understand the type of error, for example, a <strong>syntax<\/strong> error in the code.<\/li>\n<\/ul>\n\n\n\n<p>The problem is that this alert isn&#8217;t always sent via email<\/p>\n\n\n\n<p>Fortunately, however, you can identify the error quite easily. Let&#8217;s see how.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-identify-and-fix-the-error\">How to identify and fix the error<\/h2>\n\n\n\n<p>To identify and resolve the error, you need to understand what caused the error. To find the exact cause of the error, you can proceed as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Method 1: Check the administrator&#8217;s email address to see if the email has arrived. Be sure to also check the spam folder.<\/li>\n\n\n\n<li>Method 2: Activate WordPress <strong>debug mode<\/strong> to view errors or check the server error log.<\/li>\n<\/ul>\n\n\n\n<p>Both methods allow us to determine the exact cause of the WordPress critical error. The second method is the one that allows us to resolve the critical error of WordPress even if we haven&#8217;t received the email.<\/p>\n\n\n\n<p>Let&#8217;s see how to activate debug mode and where to find the <a href=\"https:\/\/supporthost.com\/wordpress-error-logs\/\">error log<\/a>.<\/p>\n\n\n\n<p class=\"note\">After identifying the error, don&#8217;t forget to deactivate the debug mode. You can simply reset the values of the lines we&#8217;ve seen earlier to \u201cfalse\u201d.<\/p>\n\n\n\n<p>In a production website (meaning it&#8217;s live and accessible to visitors), it&#8217;s advisable to disable error display and debug mode.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"activating-word-press-debug-mode\">Activating WordPress debug mode<\/h3>\n\n\n\n<p>Even if we can&#8217;t access the back-end of our site, WordPress allows us to activate <strong>debug mode<\/strong> very easily.<\/p>\n\n\n\n<p>All we need to do is modify the WordPress configuration file, which is the <strong>wp-config.php<\/strong> file located in the main directory of your site. The directory may be named as <em>public_html<\/em> or have the name corresponding to your domain.<\/p>\n\n\n\n<p>If you have an active plan with SupportHost, such as a <a href=\"https:\/\/supporthost.com\/wordpress-hosting\/\">WordPress hosting plan<\/a> you can access your site&#8217;s files directly from <strong>cPanel<\/strong>.<\/p>\n\n\n\n<p>From the <a href=\"https:\/\/supporthost.com\/tutorial\/file-manager\/\">file manager<\/a>, you can search for and locate the <strong>wp-config.php file<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"515\" src=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/cpanel-find-wp-config-file-1024x515.png\" alt=\"Cpanel Find Wp Config File\" class=\"wp-image-30930\" srcset=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/cpanel-find-wp-config-file-1024x515.png 1024w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/cpanel-find-wp-config-file-300x151.png 300w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/cpanel-find-wp-config-file-768x386.png 768w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/cpanel-find-wp-config-file-120x60.png 120w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/cpanel-find-wp-config-file.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"note\">If you have multiple WordPress installations on the same web space, for example, in subdirectories or subdomains, make sure to edit the correct file.<\/p>\n\n\n\n<p>With the <strong>file manager<\/strong>, we can directly edit the file using the built-in editor.<\/p>\n\n\n\n<p>Open the <strong>wp-config.php<\/strong> file and locate the following lines:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define( 'WP_DEBUG', false );\ndefine( 'WP_DEBUG_LOG', false );\n<\/code><\/pre>\n\n\n\n<p>We need to change the value to &#8216;true,&#8217; as shown here:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define( 'WP_DEBUG', true );\ndefine( 'WP_DEBUG_LOG', true );\n<\/code><\/pre>\n\n\n\n<p>If they are not present, we just need to add them before the final line of the file, which contains this text<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/* That's all, stop editing! Happy blogging. *\/<\/code><\/pre>\n\n\n\n<p>Here&#8217;s what the result should look like:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"530\" height=\"85\" src=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/wordpress-enable-debug-mode-and-debug-log-file.png\" alt=\"Wordpress Enable Debug Mode And Debug Log File\" class=\"wp-image-30931\" srcset=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/wordpress-enable-debug-mode-and-debug-log-file.png 530w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/wordpress-enable-debug-mode-and-debug-log-file-300x48.png 300w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/wordpress-enable-debug-mode-and-debug-log-file-120x19.png 120w\" sizes=\"auto, (max-width: 530px) 100vw, 530px\" \/><\/figure>\n\n\n\n<p>By doing this, we will have activated debug mode and will record the errors that are encountered.<\/p>\n\n\n\n<p>The first line (WP_DEBUG) allows us to activate debug mode.<\/p>\n\n\n\n<p>The second (WP_DEBUG_LOG) creates a new <code>debug.log<\/code> file where errors are logged and preserved.<\/p>\n\n\n\n<p>You can also enable the display of errors on the screen by adding this line:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define( 'WP_DEBUG_DISPLAY', true );<\/code><\/pre>\n\n\n\n<p>After making the changes, be sure to <strong>save<\/strong> them.<\/p>\n\n\n\n<p>Now that debug mode is active, you can also check the <code>debug.log<\/code> file inside the wp-content folder to see the error log.<\/p>\n\n\n\n<p>Let&#8217;s see the errors in both cases.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"identifying-the-error-on-screen-display\">Identifying the error (on-screen display)<\/h4>\n\n\n\n<p>If you have enabled the on-screen display of errors (using the WP_DEBUG_DISPLAY variable), you just need to visit the website&#8217;s homepage, and you will see the error, as shown in the example below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"653\" src=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/wordpress-critical-error-with-debug-mode-enabled-1024x653.png\" alt=\"Wordpress Critical Error With Debug Mode Enabled\" class=\"wp-image-30932\" srcset=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/wordpress-critical-error-with-debug-mode-enabled-1024x653.png 1024w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/wordpress-critical-error-with-debug-mode-enabled-300x191.png 300w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/wordpress-critical-error-with-debug-mode-enabled-768x490.png 768w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/wordpress-critical-error-with-debug-mode-enabled-99x63.png 99w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/wordpress-critical-error-with-debug-mode-enabled.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Now, all that&#8217;s left is to interpret the error. Let&#8217;s see how to do that with our example.<\/p>\n\n\n\n<p>In the alert, we are provided with:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <strong>type<\/strong> of error, in our case, it\u2019s a parse error.<\/li>\n\n\n\n<li>The affected <strong>file<\/strong> and its path, in our example, &#8216;post.php&#8217;.<\/li>\n\n\n\n<li>The <strong>line<\/strong> where the error is present is line 72.<\/li>\n<\/ul>\n\n\n\n<p>Remember that there can be multiple errors, as in our case where there are two &#8216;<strong>notice<\/strong>&#8216; errors. In this specific situation, however, the issue causing the WordPress critical error was only the first one: a syntax error in the file.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"consulting-the-debug-log-file-to-identify-the-error\">Consulting the debug.log file to identify the error<\/h4>\n\n\n\n<p>If you haven&#8217;t activated the WP_DEBUG_DISPLAY function, you can check the error directly by consulting the &#8216;<code>debug.log<\/code>&#8216; file.<\/p>\n\n\n\n<p>The file is located inside the wp-content folder, as shown here:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"999\" height=\"743\" src=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/wordpress-debug-log-file.png\" alt=\"Wordpress Debug Log File\" class=\"wp-image-30933\" srcset=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/wordpress-debug-log-file.png 999w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/wordpress-debug-log-file-300x223.png 300w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/wordpress-debug-log-file-768x571.png 768w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/wordpress-debug-log-file-85x63.png 85w\" sizes=\"auto, (max-width: 999px) 100vw, 999px\" \/><\/figure>\n\n\n\n<p>In our case, the error we just saw has been recorded, and the &#8216;<code>debug.log<\/code>&#8216; file will have this content:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"84\" src=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/debug-log-file-error-details.png\" alt=\"Debug Log File Error Details\" class=\"wp-image-30934\" srcset=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/debug-log-file-error-details.png 1024w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/debug-log-file-error-details-300x25.png 300w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/debug-log-file-error-details-768x63.png 768w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/debug-log-file-error-details-120x10.png 120w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Just as we saw before, it specifies the type of error, the file where it occurred, and the corresponding line of code.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"checking-the-error-log-file\">Checking the error_log file<\/h3>\n\n\n\n<p class=\"note\">Generally, enabling WordPress debug mode is usually sufficient to identify the error and resolve the issue of the WordPress critical error.<\/p>\n\n\n\n<p>However, to check for any <a href=\"https:\/\/supporthost.com\/php-errors\/\">PHP errors<\/a>, you can also examine the &#8216;error_log&#8217; file.<\/p>\n\n\n\n<p>If you have a hosting plan with SupportHost, this file is automatically generated, and you can find it in the error directory.<\/p>\n\n\n\n<p>All you need to do is check the &#8216;public_html&#8217; folder of your site and open the file to read the errors.<\/p>\n\n\n\n<p>You can also perform a simple file search using the cPanel file manager, as shown here:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"101\" src=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/cpanel-find-error-log-file-1024x101.png\" alt=\"Cpanel Find Error Log File\" class=\"wp-image-30935\" srcset=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/cpanel-find-error-log-file-1024x101.png 1024w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/cpanel-find-error-log-file-300x30.png 300w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/cpanel-find-error-log-file-768x76.png 768w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/cpanel-find-error-log-file-120x12.png 120w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/cpanel-find-error-log-file.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"word-press-critical-error-solutions-to-common-causes\">WordPress Critical Error: Solutions to Common Causes<\/h2>\n\n\n\n<p>To identify what triggered the appearance of the errors message: \u201c<em>There has been a critical error on your website<\/em>\u201d, the best solution is to follow the two methods we&#8217;ve just mentioned.<\/p>\n\n\n\n<p>By doing this, we can pinpoint the error precisely and resolve it.<\/p>\n\n\n\n<p>Below, we\u2019ve listed some of <strong>the most common causes<\/strong> that could have generated the problem and see what the solutions are:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table data-mtr-unique-id=\"94dbb8f634e5c2399ad6593232d7ce99-1\" class=\"mtr-table mtr-thead-th\"><thead><tr><th data-mtr-content=\"It causes\" class=\"mtr-th-tag\"><div class=\"mtr-cell-content\">It causes<\/div><\/th><th data-mtr-content=\"Solution\" class=\"mtr-th-tag\"><div class=\"mtr-cell-content\">Solution<\/div><\/th><\/tr><\/thead><tbody><tr><td data-mtr-content=\"It causes\" class=\"mtr-td-tag\"><div class=\"mtr-cell-content\">Conflict with plugins<\/div><\/td><td data-mtr-content=\"Solution\" class=\"mtr-td-tag\"><div class=\"mtr-cell-content\">Deactivate plugins<\/div><\/td><\/tr><tr><td data-mtr-content=\"It causes\" class=\"mtr-td-tag\"><div class=\"mtr-cell-content\">Problem with the theme in use<\/div><\/td><td data-mtr-content=\"Solution\" class=\"mtr-td-tag\"><div class=\"mtr-cell-content\">Reset the theme to default<\/div><\/td><\/tr><tr><td data-mtr-content=\"It causes\" class=\"mtr-td-tag\"><div class=\"mtr-cell-content\">Outdated PHP version<\/div><\/td><td data-mtr-content=\"Solution\" class=\"mtr-td-tag\"><div class=\"mtr-cell-content\">Change the PHP version<\/div><\/td><\/tr><tr><td data-mtr-content=\"It causes\" class=\"mtr-td-tag\"><div class=\"mtr-cell-content\">Insufficient PHP memory limit<\/div><\/td><td data-mtr-content=\"Solution\" class=\"mtr-td-tag\"><div class=\"mtr-cell-content\">Increase the PHP memory limit<\/div><\/td><\/tr><tr><td data-mtr-content=\"It causes\" class=\"mtr-td-tag\"><div class=\"mtr-cell-content\">Can\u2019t determine the cause<\/div><\/td><td data-mtr-content=\"Solution\" class=\"mtr-td-tag\"><div class=\"mtr-cell-content\">Restore a WordPress backup<\/div><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Let&#8217;s take a closer look at each of the possible <strong>solutions<\/strong> to the error problem.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"disabling-plugins\">Disabling Plugins<\/h3>\n\n\n\n<p>One of the causes of the WordPress critical error is problems with <a href=\"https:\/\/supporthost.com\/wordpress-plugins\/\">plugins<\/a>. In this case, <strong>deactivating<\/strong> all installed plugins and reactivating them one by one can solve the problem.<\/p>\n\n\n\n<p>Since the error doesn&#8217;t allow us to access the back-end, we need to disable the plugins manually.<\/p>\n\n\n\n<p>To do this, follow these steps:<\/p>\n\n\n\n<ol style=\"list-style-type:1\" class=\"wp-block-list\">\n<li>Access your site&#8217;s files through the file manager or an <a href=\"https:\/\/supporthost.com\/ftp\/\">FTP<\/a> client like <a href=\"https:\/\/supporthost.com\/filezilla\/\">FileZilla<\/a> or <a href=\"https:\/\/supporthost.com\/cyberduck\/\">Cyberduck<\/a><\/li>\n\n\n\n<li>Rename the &#8220;<em>plugins<\/em>&#8221; folder to \u201c<em>plugins-disabled<\/em>&#8220;.<\/li>\n<\/ol>\n\n\n\n<p>Then, create a new folder called &#8220;plugins&#8221; and move the individual plugin folders one by one to determine which one is causing the error.<\/p>\n\n\n\n<p>Alternatively, you can deactivate plugins from the database, following the procedure we\u2019ve explained here: <a href=\"https:\/\/supporthost.com\/wordpress-phpmyadmin\/#phpmyadmin_for_wordpress_disable_plugins\">Deactivate Plugins with phpMyAdmin<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"restoring-the-default-theme\">Restoring the Default Theme<\/h3>\n\n\n\n<p>Sometimes, <a href=\"https:\/\/supporthost.com\/wordpress-themes\/\">WordPress themes<\/a> can also cause conflicts that result in the critical error message. We can change the WordPress theme in use even without access to the dashboard.<\/p>\n\n\n\n<p>To do this, we need to access the database using <a href=\"https:\/\/supporthost.com\/phpmyadmin\/\">phpMyAdmin<\/a> and modify these values in the wp_options table:<\/p>\n\n\n\n<p>templates;<\/p>\n\n\n\n<p>stylesheet.<\/p>\n\n\n\n<p>In the <em>option_value column<\/em>, enter the name of the theme you want to use, as shown here:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"467\" src=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/phpmyadmin-edit-wordpress-template-1024x467.png\" alt=\"Phpmyadmin Edit WordPress Template\" class=\"wp-image-30937\" srcset=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/phpmyadmin-edit-wordpress-template-1024x467.png 1024w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/phpmyadmin-edit-wordpress-template-300x137.png 300w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/phpmyadmin-edit-wordpress-template-768x350.png 768w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/phpmyadmin-edit-wordpress-template-120x55.png 120w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/phpmyadmin-edit-wordpress-template.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>If you&#8217;re not familiar with the database, check out the step-by-step procedure in our guide on how to use <a href=\"https:\/\/supporthost.com\/wordpress-phpmyadmin\/\">phpMyAdmin for WordPress<\/a> to perform database operations.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"changing-the-php-version\">Changing the PHP Version<\/h3>\n\n\n\n<p>In some cases, if you encounter the message \u201cThere has been a critical error on your website\u201d, the cause could be the PHP version in use.<\/p>\n\n\n\n<p>If you&#8217;re using an outdated PHP version, you should switch to a more <strong>updated<\/strong> version and see if this resolves the issue.<\/p>\n\n\n\n<p>With SupportHost, you can independently set the version you prefer to use. Just follow our tutorial on how to <a href=\"https:\/\/supporthost.com\/tutorial\/php-version\/\">change the PHP version<\/a> from cPanel or our guide on how to <a href=\"https:\/\/supporthost.com\/how-to-update-php-in-wordpress\/\">check and update PHP version in WordPress<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"increasing-the-php-memory-limit\">Increasing the PHP Memory Limit<\/h3>\n\n\n\n<p>What if the problem is a memory limit issue? A memory that\u2019s too low can interrupt the execution of a PHP script.<\/p>\n\n\n\n<p>There are several ways to modify this threshold.<\/p>\n\n\n\n<p>SupportHost allows you to adjust the memory limit directly from the <strong>PHP Selector tool<\/strong> in cPanel:<\/p>\n\n\n\n<ol style=\"list-style-type:1\" class=\"wp-block-list\">\n<li>Open the &#8220;<em>Options<\/em>&#8221; tab.<\/li>\n\n\n\n<li>Edit the value next to \u201c<em>memory_limit<\/em>&#8220;.<\/li>\n<\/ol>\n\n\n\n<p>I&#8217;ve highlighted the value to be modified in this screenshot:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"411\" src=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/cpanel-php-settings-tab.png\" alt=\"Cpanel Php Settings Tab\" class=\"wp-image-30938\" srcset=\"https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/cpanel-php-settings-tab.png 1024w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/cpanel-php-settings-tab-300x120.png 300w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/cpanel-php-settings-tab-768x308.png 768w, https:\/\/supporthost.com\/wp-content\/uploads\/2022\/12\/cpanel-php-settings-tab-120x48.png 120w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Alternatively, you can <a href=\"https:\/\/supporthost.com\/increase-wordpress-memory-limit\/\" data-type=\"post\" data-id=\"156558\">increase the memory limit<\/a> by adding this line to the <code>wp-config.php<\/code> file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define( 'WP_MEMORY_LIMIT', '128M' );<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"restoring-a-word-press-backup\">Restoring a WordPress Backup<\/h3>\n\n\n\n<p>In our <a href=\"https:\/\/supporthost.com\/wordpress-backup\/\">WordPress backup<\/a> guide, we\u2019ve discussed the importance of always having an up-to-date copy of your site files in case of errors. When all previous solutions haven&#8217;t worked, and your site is still inaccessible due to the critical message error, you can still take action. Simply restore a recent <strong>backup<\/strong>.<\/p>\n\n\n\n<p>In the guide linked above, we\u2019ve explained how to do this step by step.<\/p>\n\n\n\n<p>If you haven&#8217;t been able to pinpoint the causes of the error, it&#8217;s also suggested to perform a <a href=\"https:\/\/supporthost.com\/malware-scan\/\">site scan<\/a> to rule out the presence of <strong>malware<\/strong> that may have compromised the files.<\/p>\n\n\n\n<p>SupportHost provides you with two tools for site <a href=\"https:\/\/supporthost.com\/tutorial\/antivirus-scan\/\">antivirus scanning<\/a>: ClamAV and Imunify360.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>The error message: \u201c<em>There has been a critical error on your website<\/em>\u201d can be alarming for WordPress site administrators who suddenly find themselves unable to access their site.<\/p>\n\n\n\n<p>Fortunately, WordPress has a <strong>debug mode<\/strong> designed to help users identify errors and resolve them. You just need to know where to look.<\/p>\n\n\n\n<p>We&#8217;ve seen how to identify the issue causing the WordPress critical error and listed some of the most common causes and solutions.<\/p>\n\n\n\n<p>Have you been able to determine what was causing the error on your site? Let us know in the comments below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you try to access your WordPress website, have you ever come across an error page that says \u201cThere has been a critical error on your website?\u201d In this article, How to fix the &#8220;There Has Been a Critical Error on Your Website&#8221; error, we will see how to quickly understand what is causing this [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":44143,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[28],"tags":[],"class_list":["post-30343","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-troubleshooting"],"acf":[],"_links":{"self":[{"href":"https:\/\/supporthost.com\/wp-json\/wp\/v2\/posts\/30343","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/supporthost.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/supporthost.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/supporthost.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/supporthost.com\/wp-json\/wp\/v2\/comments?post=30343"}],"version-history":[{"count":9,"href":"https:\/\/supporthost.com\/wp-json\/wp\/v2\/posts\/30343\/revisions"}],"predecessor-version":[{"id":238953,"href":"https:\/\/supporthost.com\/wp-json\/wp\/v2\/posts\/30343\/revisions\/238953"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/supporthost.com\/wp-json\/wp\/v2\/media\/44143"}],"wp:attachment":[{"href":"https:\/\/supporthost.com\/wp-json\/wp\/v2\/media?parent=30343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/supporthost.com\/wp-json\/wp\/v2\/categories?post=30343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/supporthost.com\/wp-json\/wp\/v2\/tags?post=30343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}