{"id":2021419,"date":"2024-08-01T12:39:24","date_gmt":"2024-08-01T12:39:24","guid":{"rendered":"https:\/\/wpx.net\/blog\/?p=2021419"},"modified":"2024-08-01T14:17:09","modified_gmt":"2024-08-01T14:17:09","slug":"how-to-fix-wordpress-critical-error-after-php-update","status":"publish","type":"post","link":"https:\/\/wpx.net\/blog\/how-to-fix-wordpress-critical-error-after-php-update\/","title":{"rendered":"How to Fix WordPress Critical Error After PHP Update"},"content":{"rendered":"\n<p>Critical errors are one of the most common issues in WordPress and are tightly connected to its way of working. Most frequently a critical error occurs after a PHP update of our website.<\/p>\n\n\n\n<p>Luckily, we here at WPX Hosting are quite good at resolving all kinds of technical issues, including Critical Errors. That\u2019s why we\u2019ve decided to share our experience in dealing with these issues, specifically, the ones that sometimes appear after a PHP update, in this very article. We will cover what creates critical errors, how to pinpoint their origin, and how to tackle a critical error occurring after a PHP update.<\/p>\n\n\n\n<p>This article follows our Technical Support Team&#8217;s troubleshooting process.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_Does_%E2%80%9CThere_Has_Been_a_Critical_Error_on_Your_Website%E2%80%9D_Mean\"><\/span>What Does \u201cThere Has Been a Critical Error on Your Website\u201d Mean?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To resolve an issue, we must first try to understand it. This leads us to the question: &#8220;What Does \u201cThere Has Been a Critical Error on Your Website\u201d Mean?<\/p>\n\n\n\n<p>Some WordPress errors may block you from accessing the WP Admin Dashboard, displaying the message, <strong>\u201cThere has been a critical error on this website. Please check your site admin email inbox for instructions.\u201d<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXe5gF8VdPmfM8YOnVs0ZF8Hpmf7pIWlhoMC9-R1PQsGMGAG1X5KK6FO1USVT40WIyUAKouaZ_TyRvs0ExdOZYt0zQc8GhQrcrjSPhHubAuTxIIKtrdv_OaPepu8Ay6YAc9V_wsugGEzLIOXWEiF5sbhQ85Q?key=XamNiWNP2f3ZtMBtgZcWBA\" alt=\"critical error\"\/><\/figure>\n\n\n\n<p>A critical error is a standard error that occurs because of the primary WordPress elements: <strong>plugins, themes, PHP versions, or WordPress versions<\/strong>. A change (most commonly an update) made in any of these elements can cause a critical error.<\/p>\n\n\n\n<p>Specifically, they are caused by the following reasons:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Incompatibility between plugins or between a plugin and the WordPress version or even the PHP version of the website can trigger this error.<\/li>\n\n\n\n<li>Problems with the active theme, such as outdated code or plugin conflicts, can also cause them.<\/li>\n\n\n\n<li>Syntax errors or coding mistakes in PHP files can lead to critical errors. These errors can occur in themes, plugins, or custom code snippets.<\/li>\n\n\n\n<li>When WordPress exceeds the allocated PHP memory limit, it can cause the site to crash with a critical error.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Fix_Critical_Errors_in_WordPress\"><\/span>How to Fix Critical Errors in WordPress?\u00a0<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Easier said than done, right?\u00a0 Well, don\u2019t worry\u2014we\u2019ve gathered our troubleshooting process in this article so that you can easily follow along and resolve critical errors on your site.\u00a0<\/p>\n\n\n\n<p>Before proceeding with any of the changes described, make sure to back up your website. in an earlier blog article, we&#8217;ve covered the<a href=\"https:\/\/wpx.net\/blog\/how-to-backup-your-wordpress-site-3-simple-methods\/\"><strong> 3 methods to back up your WordPress website<\/strong><\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Check_the_Error_logs\"><\/span>Check the Error logs&nbsp;<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>WordPress typically sends emails when there is a critical error on your website. These emails will most likely contain the information on which plugin or theme caused it. However, if the email does not contain any specific information or you didn&#8217;t receive it altogether, you can<a href=\"https:\/\/kb.wpx.net\/how-can-i-check-my-error-access-logs\/\"> check the error logs<\/a> of your site.&nbsp;<\/p>\n\n\n\n<p>The error log is a file that contains all kinds of errors and warnings concerning your website. The file records four types of PHP errors \u2013 warning, notice, parse, and fatal. At the beginning of each log, you\u2019ll see the type of error that was found.&nbsp;<\/p>\n\n\n\n<p>Here is an example of a PHP error found in one of the files of a plugin:&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXeKROnRr-EVUztNX-bccefNo3JDFGMedpDcJ2S-xAaoHVW4ITuEH5900SPd5JecDgMDl_E0v7qhMLpETT_7gFSgHF3-9PEkrZZ-udVT0xBMM6ywJeNALy84c6kKq_Jx2eklIypgo59nLOGDjKp_8I83LDg5?key=XamNiWNP2f3ZtMBtgZcWBA\" alt=\"\"\/><\/figure>\n\n\n\n<p>The error shows the exact PHP file and the line that is causing the Critical error on the site. If you are a developer or more tech-savvy, you can open the file and fix the code. Another option would be to contact the Support Team of the Plugin itself, but while waiting for them to resolve the matter, you can disable the plugin, to fix the error on the site.&nbsp;<\/p>\n\n\n\n<p>But how to disable the plugin when you don\u2019t have access to the Dashboard?&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_File_Manager_Method\"><\/span>The File Manager Method<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Firstly, you need to access the file manager of your hosting, if you\u2019re using WPX, check out our guide &#8211; <a href=\"https:\/\/kb.wpx.net\/how-can-i-access-my-file-manager\/\">How Can I Access My File Manager?<\/a>&nbsp; The File Manager gives you access to the files and, most importantly in this situation, the folders of your websites.&nbsp;<\/p>\n\n\n\n<p>When you open File Manager, you need to locate the \/wp-content folder of your website. This folder contains the information of your website including media, plugins, themes, etc.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXcYw_uQKdGta3Ez6fRUgM9UmH3AHUrl551i-OsA82xjILD_NFLWKM_7EYjawxaAc1C_sjno73fjsEUZQggOl-dUBMiWsX6_ZqpLGAzRQ4xqhjhJVEnS41dZh5IK8HyxldIed7_o8_93WQsvyP_OAelJ_a9-?key=XamNiWNP2f3ZtMBtgZcWBA\" alt=\"fix critical error\"\/><\/figure>\n\n\n\n<p>Then open the plugins folder and rename the folder of the plugin that is causing the critical error conflict.&nbsp;<\/p>\n\n\n\n<p>For example, if the plugin causing the error is Akismet, you rename it to akisment-stop.&nbsp; Changing the name of the plugin folder will deactivate the plugin. If that plugin was causing the issue, the critical error will be gone, and you will have access to your WordPress Dashboard.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXc1HlUpPAiOmBVvgwqlVJz1WnJ8jm-x1ZvKQLc_I8H8Os3Ar-6X71dtJXXOV6kthmpPndVzceVsfQonyRLnO7uKxWp8fe3E-V64PHCOrswtmmjf2PGofwozgpBYzsdUaJITGghMS9_D62M-ftSprAtrpKaI?key=XamNiWNP2f3ZtMBtgZcWBA\" alt=\"fix critical error\"\/><\/figure>\n\n\n\n<p>Save the changes and check your site.&nbsp;<\/p>\n\n\n\n<p><strong>What if the theme is causing the Critical Error?&nbsp;<\/strong><\/p>\n\n\n\n<p>You can do the same for the theme, with one small difference. By changing the folder name of the theme, WordPress will automatically activate a default theme. The reason for that is an integrated mechanism within WordPress itself, which doesn&#8217;t allow the website to work with no theme activated.<\/p>\n\n\n\n<p>Remember to open a non-cached version of your site after every change, so you can be sure that the error is fixed. <a href=\"https:\/\/kb.wpx.net\/how-can-i-clear-my-browser-cache\/\">Clearing the browser cache <\/a>or opening the website in private mode should work in this case.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Revert_the_PHP_version\"><\/span>Revert the PHP version<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The easiest solution of course would be to simply <a href=\"https:\/\/kb.wpx.net\/how-can-i-change-the-php-version-of-my-website\/\">change back the PHP version<\/a> to the one previously used by the website.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXfIJW8HaPMuznNmhilnIN9cNFcfAHOvR1iIkmKFmPd3UP2H24UnPYjCidGxTfX6nIdZRrA2g788x8ZyRbJlNfw48x36qmx1AxNGfMLJBPCZuHs_r04lWDpd3fFqGsOrLTslJusPT6d9dTcotfwrKFz0jSN5?key=XamNiWNP2f3ZtMBtgZcWBA\" alt=\"revert php version\"\/><\/figure>\n\n\n\n<p>Typically, this should clear the critical error as you restore the old configuration eliminating the conflict between the plugin or theme and the PHP version.<\/p>\n\n\n\n<p>This is the best option if you need to wait for the plugin or theme support to fix the conflict and release an update. Remember to always keep the latest versions of all your plugins, themes, and PHP. Deactivate and remove unused themes and plugins to improve your site\u2019s security, performance, and reliability.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Restore_the_website\"><\/span>Restore the website&nbsp;<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>If none of the solutions above doesn\u2019t work, you can always restore the website from a backup. Here at WPX, we make daily backups of all sites hosted with us. You can<a href=\"https:\/\/kb.wpx.net\/how-can-i-restore-my-website\/\"> restore the website <\/a>from an automatic backup with a just few clicks from the hosting panel.&nbsp;<\/p>\n\n\n\n<p>Or, if you have a personal backup made before the critical error appeared, you can use it to<a href=\"https:\/\/kb.wpx.net\/how-can-i-restore-my-site-from-a-personal-backup\/\"> restore the site.&nbsp;<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>At this point, you most probably understand that the sheer number of elements found in WordPress, each with its own pieces of code, can cause conflicts leading to critical errors.<\/p>\n\n\n\n<p>Although this article covers the specific case of critical errors after a PHP update, the steps for resolving them we&#8217;ve discussed above can be applied successfully to other origins of critical errors.<\/p>\n\n\n\n<p>So here we have it, folks. Following this article should ensure a working WordPress website after a critical error 90% of the time. As for the other 10%, you have the <a href=\"https:\/\/wpx.net\/tickets\/new\/\"><strong>WPX Support Team<\/strong><\/a> \ud83d\ude09<\/p>\n\n\n\n<p>We also hope that you will read this article out of curiosity rather than necessity.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Critical errors are one of the most common issues in WordPress and are tightly connected to its way of working. Most frequently a critical error occurs after a PHP update of our website. Luckily, we here at WPX Hosting are quite good at resolving all kinds of technical issues, including Critical Errors. That\u2019s why we\u2019ve [&hellip;]<\/p>\n","protected":false},"author":14,"featured_media":2021420,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"cybocfi_hide_featured_image":"","footnotes":""},"categories":[86],"tags":[138,145,169,121],"ppma_author":[170],"class_list":["post-2021419","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","tag-guide","tag-how-to","tag-php-update","tag-wordpress"],"blocksy_meta":[],"authors":[{"term_id":170,"user_id":31,"is_guest":0,"slug":"alexander-k-grigorov","display_name":"Alexander Grigorov","avatar_url":{"url":"https:\/\/wpx.net\/blog\/wp-content\/uploads\/2024\/08\/75553089_167074147682464_4282372209915199488_n.jpg","url2x":"https:\/\/wpx.net\/blog\/wp-content\/uploads\/2024\/08\/75553089_167074147682464_4282372209915199488_n.jpg"},"0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/posts\/2021419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/comments?post=2021419"}],"version-history":[{"count":3,"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/posts\/2021419\/revisions"}],"predecessor-version":[{"id":2021432,"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/posts\/2021419\/revisions\/2021432"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/media\/2021420"}],"wp:attachment":[{"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/media?parent=2021419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/categories?post=2021419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/tags?post=2021419"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/wpx.net\/blog\/wp-json\/wp\/v2\/ppma_author?post=2021419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}