{"id":1652,"date":"2023-01-22T13:24:39","date_gmt":"2023-01-22T18:24:39","guid":{"rendered":"https:\/\/www.familytidings.com\/blog\/?p=1652"},"modified":"2023-01-22T13:24:39","modified_gmt":"2023-01-22T18:24:39","slug":"upgrading-from-php-7-4-to-8-0","status":"publish","type":"post","link":"https:\/\/www.familytidings.com\/blog\/?p=1652","title":{"rendered":"Upgrading from PHP 7.4 to 8.0"},"content":{"rendered":"\n<p>PHP 7.4 is no longer supported.  My host offers 8.0, so I upgraded, but WordPress failed to run.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Starting State<\/h2>\n\n\n\n<p>WordPress version 6.1.1<br>PHP 7.4 FastCGI<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Error Description<\/h2>\n\n\n\n<p>Upgrading to PHP 8.0 FastCGI caused WordPress to show:<\/p>\n\n\n\n<p><em>There has been a critical error on this website. Please check your site admin email inbox for instructions<\/em>.  <\/p>\n\n\n\n<p>None of the WordPress pages worked, including the recovery page that WordPress emailed to me, wp-login.php?action=enter_recovery_mode.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Diagnosis<\/h2>\n\n\n\n<p>To diagnose the problem, I turned on <a href=\"https:\/\/wordpress.org\/documentation\/article\/debugging-in-wordpress\/\">debug logs<\/a> by adding these lines to <code>wp-config.php<\/code>:<br><code>define( 'WP_DEBUG', true );<br>define( 'WP_DEBUG_LOG', true );<\/code><\/p>\n\n\n\n<p>This showed a fatal error in the wp-cache plugin.  This was surprising because that plugin was disabled.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution<\/h2>\n\n\n\n<p>Moving the <code>wp-cache<\/code> directory from the <code>plugins<\/code> directory to another directory I created,  <code>plugins-old<\/code>, fixed the problem.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP 7.4 is no longer supported. My host offers 8.0, so I upgraded, but WordPress failed to run. Starting State WordPress version 6.1.1PHP 7.4 FastCGI Error Description Upgrading to PHP 8.0 FastCGI caused WordPress to show: There has been a critical error on this website. Please check your site admin email inbox for instructions. None [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1652","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1652","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1652"}],"version-history":[{"count":3,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1652\/revisions"}],"predecessor-version":[{"id":1658,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1652\/revisions\/1658"}],"wp:attachment":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1652"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1652"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1652"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}