{"id":31717,"date":"2021-06-01T06:02:08","date_gmt":"2021-06-01T06:02:08","guid":{"rendered":"\/tutorials\/?p=31717"},"modified":"2026-03-09T19:19:16","modified_gmt":"2026-03-09T19:19:16","slug":"how-to-fix-wordpress-critical-error","status":"publish","type":"post","link":"\/ng\/tutorials\/how-to-fix-wordpress-critical-error","title":{"rendered":"There has been a critical Error on this website: 7 quick fixes"},"content":{"rendered":"<?xml encoding=\"utf-8\" ?><p>Encountering the &ldquo;<strong>There has been a critical error on your website<\/strong>&rdquo; message can be concerning for WordPress site owners. It may restrict access for users and even prevent entry into the admin panel.<\/p><p>Fortunately, resolving this problem can be relatively quick. This article explains what the error message indicates and presents five methods to fix it.<\/p><p class=\"has-text-align-center\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/Mega-WordPress-Cheat-EN.pdf\">Download all-in-one WordPress cheat sheet<\/a><\/p><p>\n\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-what-does-there-has-been-a-critical-error-on-your-website-mean\">What Does &ldquo;There Has Been a Critical Error on Your Website&rdquo; Mean?<\/h2><p>Some WordPress errors may block you from accessing the dashboard, displaying the message, <strong>&ldquo;There has been a critical error on this website. Please check your site admin email inbox for instructions.&rdquo;<\/strong><\/p><figure class=\"wp-block-image size-full\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/error-message.png\"><img loading=\"lazy\" decoding=\"async\" width=\"790\" height=\"172\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/error-message.png\/public\" alt='\"There has been a critical error on this website\" message.' class=\"wp-image-31713\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/error-message.png\/w=790,fit=scale-down 790w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/error-message.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/error-message.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/error-message.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 790px) 100vw, 790px\" \/><\/a><\/figure><p>This message means that there&rsquo;s a fatal PHP error on the site. It occurs when a PHP script stops running and is unable to complete its process.<\/p><p>To help its users, WordPress has a feature that detects when a plugin or a theme causes a fatal error and sends a notification to the admin email address. In the email, users receive more details about what is causing the issue.<\/p><figure class=\"wp-block-image size-full\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/error-details-email.png\"><img loading=\"lazy\" decoding=\"async\" width=\"581\" height=\"103\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/error-details-email.png\/public\" alt=\"Error details that users get on the email.\" class=\"wp-image-31714\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/error-details-email.png\/w=581,fit=scale-down 581w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/error-details-email.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/error-details-email.png\/w=150,fit=scale-down 150w\" sizes=\"auto, (max-width: 581px) 100vw, 581px\" \/><\/a><\/figure><p>The email also contains a URL to access the site in <a href=\"\/ng\/tutorials\/wordpress-recovery-mode\">recovery mode<\/a>. Click the link to safely log in to the WordPress dashboard and fix the issue.<\/p><p>If you encounter this WordPress error and don&rsquo;t see any email notification in your inbox, check your spam folder. However, there may be cases when site owners don&rsquo;t receive the email and have to locate the issue by themselves.<\/p><h2 class=\"wp-block-heading\" id=\"h-7-ways-to-fix-a-critical-error-in-wordpress\">7 Ways to Fix a Critical Error in WordPress<\/h2><p>To fix a critical WordPress error, you have first to locate the cause of the problem. The notification email from WordPress provides more details about which file and line of code caused the issue, but don&rsquo;t worry if you didn&rsquo;t receive it.<\/p><p>There are seven methods to locate and resolve the critical error in your WordPress site.<\/p><h3 class=\"wp-block-heading\" id=\"h-1-check-error-logs\">1. Check Error Logs<\/h3><p>The first method is by <a href=\"\/ng\/tutorials\/website\/how-to-check-your-website-error-log\">checking the error_log<\/a> file, which stores PHP error information. Use the <strong>File<\/strong> <strong>Manager<\/strong> of a File Transfer Protocol (FTP) client on your hosting account and go to <strong>home<\/strong>\/<strong>[username]\/.logs\/error_log_[domain]<\/strong>.<\/p><p>The file records four types of PHP errors &ndash; warning, notice, parse, and fatal. At the beginning of each log, you&rsquo;ll see the type of error that was found. If you find a parse or fatal error, you&rsquo;ll have to fix it.<\/p><figure class=\"wp-block-image size-full\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/error-log.png\"><img loading=\"lazy\" decoding=\"async\" width=\"863\" height=\"207\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/error-log.png\/public\" alt=\"Content of error_log file.\" class=\"wp-image-31718\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/error-log.png\/w=863,fit=scale-down 863w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/error-log.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/error-log.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/error-log.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 863px) 100vw, 863px\" \/><\/a><\/figure><p>If you can&rsquo;t locate the <strong>error_log<\/strong> file, ask your hosting provider for help. Keep in mind that the <strong>error_log<\/strong> file will only be available if you enable PHP error logging. To do so, configure the PHP settings from your hPanel.<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"838\" height=\"261\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/PHP-log-errors.png\/public\" alt=\"The PHP options tab in the PHP configuration section on hPanel. logErrors option is highlighted\" class=\"wp-image-81423\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/PHP-log-errors.png\/w=838,fit=scale-down 838w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/PHP-log-errors.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/PHP-log-errors.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/PHP-log-errors.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 838px) 100vw, 838px\" \/><\/figure><\/div><p>If you still can&rsquo;t check the error log file, try the following method using the debug mode.<\/p><?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-large\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-wordpress-hosting\" href=\"\/ng\/wordpress-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"2048\" height=\"600\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/public\" alt=\"\" class=\"wp-image-111781\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=2048,fit=scale-down 2048w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/06\/New-WP_in-text-banner.png\/w=1536,fit=scale-down 1536w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/a><\/figure><h3 class=\"wp-block-heading\" id=\"h-2-debug-wordpress\">2. Debug WordPress<\/h3><p>WordPress comes with a built-in debugging system that identifies code errors in the core software, themes, and plugins.<\/p><p>To activate the <a href=\"\/ng\/tutorials\/debug-wordpress\">WordPress debug mode<\/a>, open the <a href=\"\/ng\/tutorials\/wp-config-php\">wp-config.php<\/a> file in your <strong>public_html<\/strong> directory. Then, find the following lines:<\/p><pre class=\"wp-block-preformatted\">define( 'WP_DEBUG', false );\ndefine( 'WP_DEBUG_DISPLAY', false );\ndefine( 'WP_DEBUG_LOG', false );\ndefine( 'SCRIPT_DEBUG', false );<\/pre><p>The <strong>&ldquo;false&rdquo;<\/strong> values mean that WordPress debug mode is deactivated. Replace <strong>&ldquo;false&rdquo;<\/strong> with <strong>&ldquo;true&rdquo;<\/strong> on all lines to activate it.<\/p><p>These four lines contain PHP constants. When they&rsquo;re activated, they perform the following tasks:<\/p><ul class=\"wp-block-list\">\n<li><strong>WP_DEBUG<\/strong> &ndash; triggers the debug mode in WordPress.<\/li>\n\n\n\n<li><strong>WP_DEBUG_DISPLAY<\/strong> &ndash; shows debug messages on the pages&rsquo; HTML.<\/li>\n\n\n\n<li><strong>WP_DEBUG_LOG<\/strong> &ndash; stores error details in the <strong>debug.log<\/strong> file.<\/li>\n\n\n\n<li><strong>SCRIPT_DEBUG<\/strong> &ndash; runs the <strong>&ldquo;dev&rdquo;<\/strong> versions of core CSS and JavaScript files instead of the minified versions.<\/li>\n<\/ul><p>If you can&rsquo;t find those lines in the <strong>wp-config.php<\/strong> file, simply add them to the script. Remember to input the <strong>&ldquo;true&rdquo;<\/strong> value on each line.<\/p><p>After enabling the debug mode, refresh your site. You should see the details above the error message.<\/p><figure class=\"wp-block-image size-full\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/wp-debug-message.png\"><img loading=\"lazy\" decoding=\"async\" width=\"674\" height=\"161\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/wp-debug-message.png\/public\" alt='\"There has been a critical error on this website\" message after WordPress debug is activated.' class=\"wp-image-31720\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/wp-debug-message.png\/w=674,fit=scale-down 674w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/wp-debug-message.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/wp-debug-message.png\/w=150,fit=scale-down 150w\" sizes=\"auto, (max-width: 674px) 100vw, 674px\" \/><\/a><\/figure><p>Fix the issue according to the instructions, and your site should work normally again. Deactivate the debug mode by changing the values to <strong>&ldquo;false&rdquo;<\/strong> once you&rsquo;ve resolved the problem.<\/p><h3 class=\"wp-block-heading\" id=\"h-3-solve-any-theme-or-plugin-conflicts\">3. Solve Any Theme or Plugin Conflicts<\/h3><p>The following method will help find conflicts in your theme and plugins.<\/p><p>Start by checking your theme. If you have access to the WordPress admin area, simply switch the active theme to a default one such as <a href=\"https:\/\/wordpress.org\/themes\/twentytwenty\/\">Twenty Twenty<\/a>.<\/p><p>However, if you can&rsquo;t access the admin panel, use the File Manager or an <a href=\"\/ng\/tutorials\/ftp\/filezilla-ftp-configuration\">FTP client like FileZilla<\/a> and go to <strong>public_htm<\/strong>l &rarr;<strong> wp-content<\/strong> &rarr;<strong> themes<\/strong>. Find your active theme&rsquo;s folder and rename it into <strong>youractivetheme-disabled<\/strong>.<\/p><p>Once you&rsquo;ve done that, reload the site. If it loads as expected, then there&rsquo;s a conflicting theme present, and you may have to roll back to the theme&rsquo;s previous version or get an entirely new theme instead.<\/p><p>On the other hand, if the error persists, you should check if there&rsquo;s an issue with your plugins.<\/p><p>The process is similar to checking your theme. If you have access to the WordPress admin panel, disable all plugins.<\/p><p>If you can&rsquo;t access the admin panel, use the File Manager or an FTP client and go to <strong>public_html<\/strong> &rarr; <strong>wp-content<\/strong> &rarr; <strong>plugins<\/strong>. Rename all plugin directories into <strong>yourplugin-disabled <\/strong>except the Elementor plugin folder if you have it installed.<\/p><p>If you&rsquo;re using hPanel, there&rsquo;s an easier way to do this. Go to the <strong>WordPress <\/strong>&rarr; <strong>Security <\/strong>section and simply disable all plugins.<\/p><p>Refresh your site. If it loads normally, that indicates a conflicting plugin.<\/p><p>To find out exactly which plugin caused the error, you have to reactivate them one by one, reloading the web page every time.<\/p><p>If you&rsquo;ve renamed your plugins&rsquo; folders, go to <strong>public_html<\/strong> &rarr; <strong>wp-content<\/strong> &rarr; <strong>plugins<\/strong>. Revert all plugin folders into their original directory names one by one.<\/p><p><div class=\"protip\">\n                    <h4 class=\"title\">Pro Tip<\/h4>\n                    <p>Conflicting plugins of themes often cause errors like this. Deactivate and remove unused themes and plugins to improve your site's security, performance, and reliability.<\/p>\n                <\/div>\n\n\n\n<\/p><h3 class=\"wp-block-heading\" id=\"h-4-restore-the-site-from-a-backup\">4. Restore the Site From a Backup<\/h3><p>Using this method, you need to restore the website files from a backup. An error like this is one reason why <a href=\"\/ng\/tutorials\/backup-wordpress\">backing up your WordPress site<\/a> is essential.<\/p><p><strong>Using hPanel<\/strong><\/p><p>To restore the backup files using hPanel, go to <strong>Files <\/strong>&rarr;<strong> Backups<\/strong> and select <strong>Files backups<\/strong>.<\/p><figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/03\/hpanel-files-backups-files-selected.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"561\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/hpanel-files-backups-files-selected.png\/public\" alt=\"The Backups section on hPanel. Files backups button is selected\" class=\"wp-image-80737\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/hpanel-files-backups-files-selected.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/hpanel-files-backups-files-selected.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/hpanel-files-backups-files-selected.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/hpanel-files-backups-files-selected.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><p>Choose the backup version you want and click <strong>Show Files<\/strong>. A new section will appear at the bottom, showing the backup files directory. If you want to restore the whole site, select the <strong>public_html<\/strong> folder and click <strong>Restore Files<\/strong>.<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1100\" height=\"698\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/backup-restore.png\/public\" alt=\"Restoring backup files using hPanel.\" class=\"wp-image-81444\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/backup-restore.png\/w=1100,fit=scale-down 1100w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/backup-restore.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/backup-restore.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/backup-restore.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/backup-restore.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1100px) 100vw, 1100px\" \/><\/figure><\/div><p>The next step is to restore the database. Go to the <strong>Database backups<\/strong> section and select the backup data to restore. Once you&rsquo;ve selected the correct backup data, click <strong>Restore<\/strong>.<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/03\/database-restore.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1099\" height=\"645\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/database-restore.png\/public\" alt=\"Restoring backup database using hPanel.\" class=\"wp-image-81448\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/database-restore.png\/w=1099,fit=scale-down 1099w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/database-restore.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/database-restore.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/database-restore.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/database-restore.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1099px) 100vw, 1099px\" \/><\/a><\/figure><\/div><p><strong>Using WordPress plugins<\/strong><\/p><p>If you have a backup plugin like <a href=\"https:\/\/wordpress.org\/plugins\/updraftplus\/\">UpdraftPlus<\/a> and want to use it instead, go to your WordPress admin using the recovery mode URL you received in the email about the error.<\/p><p>Go to the backup plugin&rsquo;s panel and find the restore function. Different plugins may have different interface layouts, but in general, you only need to choose a backup file and restore the website.<\/p><figure class=\"wp-block-image size-full\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/updraft-plus-backup-restore.png\"><img loading=\"lazy\" decoding=\"async\" width=\"764\" height=\"266\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/updraft-plus-backup-restore.png\/public\" alt=\"Restoring backup files using UpdraftPlus plugin.\" class=\"wp-image-31727\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/updraft-plus-backup-restore.png\/w=764,fit=scale-down 764w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/updraft-plus-backup-restore.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/updraft-plus-backup-restore.png\/w=150,fit=scale-down 150w\" sizes=\"auto, (max-width: 764px) 100vw, 764px\" \/><\/a><\/figure><p>Another option is using a migration plugin such as <a href=\"https:\/\/wordpress.org\/plugins\/all-in-one-wp-migration\/\">All-in-One WP Migration<\/a>. It allows importing <strong>.wpress<\/strong> backup files from local storage easily. Go to <strong>All-in-One WP Migration <\/strong>-&gt;<strong> Import<\/strong>, and select the <strong>.wpress<\/strong> file you wish to upload.<\/p><figure class=\"wp-block-image size-full\"><a href=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/all-in-one-wp-migration-import.png\"><img loading=\"lazy\" decoding=\"async\" width=\"658\" height=\"286\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/all-in-one-wp-migration-import.png\/public\" alt=\"Importing backup files using All-in-One WP Migration plugin.\" class=\"wp-image-31728\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/all-in-one-wp-migration-import.png\/w=658,fit=scale-down 658w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/all-in-one-wp-migration-import.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2021\/06\/all-in-one-wp-migration-import.png\/w=150,fit=scale-down 150w\" sizes=\"auto, (max-width: 658px) 100vw, 658px\" \/><\/a><\/figure><h3 class=\"wp-block-heading\" id=\"h-5-upgrade-php-version\">5. Upgrade PHP Version<\/h3><p>WordPress requires <strong>PHP 7.4<\/strong> or greater. Check the PHP version on your web host, and if you find you&rsquo;re using an older version of PHP, upgrading it to 7.4 or greater can fix the <strong>&ldquo;There has been a critical error on your website&rdquo;<\/strong> error.<\/p><p>Using hPanel, go to the <strong>Advanced <\/strong>&rarr;<strong> PHP Configuration<\/strong> section. You should see the active PHP version on the <strong>PHP Version<\/strong> tab. If it runs on PHP 7.3 or lower, select PHP 7.4 or PHP 8.0 and click <strong>Save<\/strong>.<\/p><figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1126\" height=\"637\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/hpanel-advanced-phpconfiguration-phpversion.png\/public\" alt=\"hPanel phpConfiguration setting for phpVersion\" class=\"wp-image-79430\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/hpanel-advanced-phpconfiguration-phpversion.png\/w=1126,fit=scale-down 1126w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/hpanel-advanced-phpconfiguration-phpversion.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/hpanel-advanced-phpconfiguration-phpversion.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/hpanel-advanced-phpconfiguration-phpversion.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/hpanel-advanced-phpconfiguration-phpversion.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1126px) 100vw, 1126px\" \/><\/figure><h3 class=\"wp-block-heading\">6. Reupload WordPress Core Files<\/h3><p>If there are conflicts on the WordPress core files, reuploading them should fix the critical WordPress error. The easiest way to do it is to select the <strong>Re-install version x.x.x<\/strong> button on the <strong>Updates <\/strong>page of your admin dashboard.<\/p><p>You can reupload the core files using an FTP client if you no longer have access to your WordPress admin dashboard. Download the core files from the <a href=\"https:\/\/wordpress.org\/download\/\">official WordPress website<\/a> and upload them to your site while also excluding <strong>wp-content<\/strong> folder.<\/p><p>Alternatively, download the core files using <a href=\"\/ng\/tutorials\/wp-cli\">WP-CLI<\/a> by following these steps:<\/p><ol class=\"wp-block-list\">\n<li>Log in to your website using your hosting account&rsquo;s <a href=\"\/ng\/tutorials\/how-to-use-putty-ssh\">SSH access<\/a>.<\/li>\n\n\n\n<li>Run the following command to access your website directory. Replace <strong>domain.tld <\/strong>with your actual domain directory.<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">cd domains\/domain.tld\/public_html\/<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>Download WordPress core files using the following command.<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">wp core download --skip-content --force<\/pre><h3 class=\"wp-block-heading\">7. Increase PHP Memory Limit<\/h3><p>By default, WordPress sets the PHP memory limit to <strong>128 MB<\/strong>. Increasing the <a href=\"\/ng\/tutorials\/wordpress-memory-limit\">WordPress memory limit<\/a> value should resolve the critical WordPress error if it&rsquo;s due to insufficient memory.<\/p><p>Hostinger users can set the new memory limit via the hPanel. Navigate to <strong>PHP Configuration <\/strong>&rarr; <strong>PHP Options<\/strong>, then click on the dropdown menu of the <strong>memoryLimit<\/strong> field.<\/p><p>Another way to try this method is to modify the <strong>wp-config.php <\/strong>file using an FTP client or the File Manager in your hosting control panel. Here&rsquo;s how to do it:<\/p><ol class=\"wp-block-list\">\n<li>Locate your <strong>wp-config.php<\/strong> file in the <strong>public_html<\/strong> directory.<\/li>\n\n\n\n<li>Open the file and add the following line above <strong>\/* That&rsquo;s all, stop editing! Happy blogging. *\/<\/strong>.<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">define('WP_MEMORY_LIMIT','1536M');<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>Save the changes and refresh your website.<\/li>\n<\/ol><p>If you&rsquo;re already at the maximum limit, the last solution will be to upgrade your hosting plan.<\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>There&rsquo;s no need to panic if you encounter the <strong>&ldquo;There has been a critical error on your website&rdquo;<\/strong> message.<\/p><p>Simply check your email address and find an email from WordPress to locate the issue and quickly fix it.<\/p><p>Even if you don&rsquo;t receive the email, there are five ways available to resolve the problem:<\/p><ul class=\"wp-block-list\">\n<li>Check the site&rsquo;s error logs<\/li>\n\n\n\n<li>Use the WordPress debug mode<\/li>\n\n\n\n<li>Solve potential theme or plugin conflicts<\/li>\n\n\n\n<li>Restore the site using backup files<\/li>\n\n\n\n<li>Upgrade the site&rsquo;s PHP version<\/li>\n<\/ul><p>We also recommend creating backups regularly. Therefore, you&rsquo;ll be able to restore your site quickly if you get a WordPress error message such as this.<\/p><p><div class=\"protip\">\n                    <h4 class=\"title\">Learn How to Solve WordPress Errors when Making Changes<\/h4>\n                    <p> <a href=\"\/ng\/tutorials\/fix-sorry-this-file-type-is-not-permitted-for-security-reasons-error-in-wordpress\">How to Fix \"Sorry, This File Type Is Not Permitted for Security Reasons\" Error<\/a><br>\n<a href=\"\/ng\/tutorials\/http-error-when-uploading-images-to-wordpress\">How to Fix WordPress HTTP Error when Uploading Images<\/a><br>\n<a href=\"\/ng\/tutorials\/fix-wordpress-failed-to-write-file-to-disk\">How to Fix \"Failed to Write to Disk\" in WordPress<\/a><br>\n<a href=\"\/ng\/tutorials\/fix-missing-temporary-folder-error\">How to Fix \"Missing a Temporary Folder\" Error <\/a><br>\n<a href=\"\/ng\/tutorials\/fix-the-is-its-parent-directory-writable-by-the-server-wordpress-error\">How to Fix \"Is Its Parent Directory Writable by the Server?\" Error on WordPress<\/a><br>\n<a href=\"\/ng\/tutorials\/fix-locked-out-of-wordpress-admin-issue\">How to Fix Being Locked Out of WordPress<\/a><br>\n<a href=\"\/ng\/tutorials\/fix-wordpress-login-redirect-loop\">How to Fix the Login Redirect Loop<\/a><\/p>\n                <\/div>\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Encountering the &ldquo;There has been a critical error on your website&rdquo; message can be concerning for WordPress site owners. It may restrict access for users and even prevent entry into the admin panel. Fortunately, resolving this problem can be relatively quick. This article explains what the error message indicates and presents five methods to fix [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ng\/tutorials\/how-to-fix-wordpress-critical-error\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":172,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to Fix There Has Been a Critical Error on This Website","rank_math_description":"A critical error can be frustrating. Learn how to fix \"There has been a critical error on your website\" error using five different methods.","rank_math_focus_keyword":"there has been a critical error on your website","footnotes":""},"categories":[22637],"tags":[],"class_list":["post-31717","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-fix-wordpress-critical-error","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/tutoriais\/ha-um-erro-critico-no-seu-site","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/il-y-a-eu-une-erreur-critique-sur-ce-site-web","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/ha-habido-un-error-critico-en-esta-web","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/cara-mengatasi-wordpress-critical-error","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-fix-wordpress-critical-error","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-fix-wordpress-critical-error","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-fix-wordpress-critical-error","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/ha-habido-un-error-critico-en-esta-web","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/ha-habido-un-error-critico-en-esta-web","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/ha-habido-un-error-critico-en-esta-web","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/pt\/tutoriais\/ha-um-erro-critico-no-seu-site","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-fix-wordpress-critical-error","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-fix-wordpress-critical-error","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-fix-wordpress-critical-error","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-fix-wordpress-critical-error","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/31717","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/users\/172"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/comments?post=31717"}],"version-history":[{"count":27,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/31717\/revisions"}],"predecessor-version":[{"id":144852,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/31717\/revisions\/144852"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/media?parent=31717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/categories?post=31717"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/tags?post=31717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}