{"id":1208,"date":"2026-07-17T07:55:30","date_gmt":"2026-07-17T07:55:30","guid":{"rendered":"https:\/\/www.freethought.uk\/help\/?p=1208"},"modified":"2026-07-17T07:55:31","modified_gmt":"2026-07-17T07:55:31","slug":"how-to-fix-wordpress-critical-errors-after-a-php-upgrade","status":"publish","type":"post","link":"https:\/\/www.freethought.uk\/help\/how-to-fix-wordpress-critical-errors-after-a-php-upgrade\/","title":{"rendered":"How to Fix WordPress Critical Errors After a PHP Upgrade"},"content":{"rendered":"\n<p>Upgrading your site&#8217;s PHP version (for example, moving from PHP 7.4 to PHP 8.x) is essential for security and speed. However, it\u2019s not uncommon to hit a snag immediately after an upgrade, such as seeing the dreaded message:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><em>&#8220;There has been a critical error on this website. Please check your site admin email inbox for instructions.&#8221;<\/em><\/p>\n<\/blockquote>\n\n\n\n<p>Don&#8217;t worry! This almost always means an older plugin or theme on your site isn&#8217;t fully compatible with the newer PHP version yet. Here is a step-by-step guide to diagnosing and fixing the issue.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd0d Why Does This Happen?<\/h3>\n\n\n\n<p>Newer PHP versions remove outdated code functions (called &#8220;deprecated functions&#8221;) and enforce stricter security rules. If a plugin or theme installed on your site was written using older code, it can trigger a fatal script error when run under a newer PHP version.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udee0\ufe0f Step-by-Step Troubleshooting Guide<\/h3>\n\n\n\n<p>If you lose access to your site or <code>wp-admin<\/code> dashboard after a PHP upgrade, you can easily troubleshoot using <strong>cPanel File Manager<\/strong>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Step 1: Temporarily Roll Back PHP (Quick Recovery Check)<\/h4>\n\n\n\n<p>If your site is live and you need it back online instantly while you troubleshoot:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Log in to <strong>cPanel<\/strong>.<\/li>\n\n\n\n<li>Go to <strong>Select PHP Version<\/strong> (or <strong>MultiPHP Manager<\/strong>).<\/li>\n\n\n\n<li>Switch your site back to the previous PHP version (e.g., PHP 7.4).<\/li>\n\n\n\n<li>Save changes. If your site loads again, you know with 100% certainty that a plugin or theme compatibility issue is the cause.<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">Step 2: Enable WP Debug Mode to Identify the Bad Plugin<\/h4>\n\n\n\n<p>To see exactly <em>which<\/em> plugin is failing, turn on WordPress debugging:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>In cPanel, open <strong>File Manager<\/strong> and navigate to your site&#8217;s root directory (<code>public_html<\/code>).<\/li>\n\n\n\n<li>Right-click the <code>wp-config.php<\/code> file and select <strong>Edit<\/strong>.<\/li>\n\n\n\n<li>Find the line that says: <code>define('WP_DEBUG', false);<\/code><\/li>\n\n\n\n<li>Change <code>false<\/code> to <code>true<\/code>, or add these lines right above <code>\/* That's all, stop editing! *\/<\/code>: <code>define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false);<\/code><\/li>\n\n\n\n<li>Refresh your broken website page, then open the newly created <code>debug.log<\/code> file located inside the <code>\/wp-content\/<\/code> folder in File Manager. Look at the bottom lines for a path pointing to a specific plugin (e.g., <code>\/wp-content\/plugins\/plugin-name\/<\/code>).<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">Step 3: Deactivate the Problematic Plugin via File Manager<\/h4>\n\n\n\n<p>Once you know which plugin is causing the issue:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>In File Manager, navigate to <code>public_html\/wp-content\/plugins\/<\/code>.<\/li>\n\n\n\n<li>Find the folder of the incompatible plugin.<\/li>\n\n\n\n<li>Rename the folder by adding <code>_old<\/code> or <code>_disabled<\/code> to the end (e.g., rename <code>bad-plugin<\/code> to <code>bad-plugin_disabled<\/code>).<\/li>\n\n\n\n<li>Switch your PHP version back to the newer version in cPanel.<\/li>\n<\/ol>\n\n\n\n<p>Renaming the folder forces WordPress to safely deactivate the plugin, allowing the rest of your site and admin dashboard to load normally.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\ude80 When to Contact Support<\/h3>\n\n\n\n<p>If you\u2019ve checked your error logs in File manager, debug logs, disabled your plugins, and still see a critical error\u2014or if your site is mission-critical and you need an engineer to assist\u2014we\u2019re happy to help!<\/p>\n\n\n\n<p>When opening a ticket at <strong>my.cloudabove.com<\/strong>, please let us know:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>Your Domain Name.<\/strong><\/li>\n\n\n\n<li><strong>The target PHP version<\/strong> you are trying to upgrade to.<\/li>\n\n\n\n<li><strong>Any error messages<\/strong> listed in your <code>debug.log<\/code> or error logs.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udee1\ufe0f Prevention Tips for Future Upgrades<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Update everything first:<\/strong> Always update WordPress core, all plugins, and your active theme to their latest versions <em>before<\/em> upgrading your PHP version.<\/li>\n\n\n\n<li><strong>Test on a Staging site:<\/strong> If your hosting plan includes a staging environment, test the PHP upgrade there first to catch any errors without affecting your live site.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Upgrading your site&#8217;s PHP version (for example, moving from PHP 7.4 to PHP 8.x) is essential for security and speed. However, it\u2019s not uncommon to hit a snag immediately after an upgrade, such as seeing the dreaded message: &#8220;There has been a critical error on this website. Please check your&hellip;<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,26],"tags":[],"class_list":["post-1208","post","type-post","status-publish","format-standard","hentry","category-cpanel","category-wordpress"],"_links":{"self":[{"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/posts\/1208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/comments?post=1208"}],"version-history":[{"count":1,"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/posts\/1208\/revisions"}],"predecessor-version":[{"id":1209,"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/posts\/1208\/revisions\/1209"}],"wp:attachment":[{"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/media?parent=1208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/categories?post=1208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.freethought.uk\/help\/wp-json\/wp\/v2\/tags?post=1208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}