Site crashes with php 8.1
-
I have two WordPress sites that use the same minimalist theme (Arke). I have made a child theme for each to add features I want. (That may sound like I know what I’m doing, but I’m really still a novice.) One site still uses the classic editor and I write in HTML and the other I use the block editor. I copied the block site child theme from the successful HTML site. Of course there are differences because their layouts aren’t the same, but I have checked the both main child theme files and they appear to be fundamentally the same.
Both sites used to run on php 7.4, but some time back I upgraded to php 8.1, as recommended by my host (Inmotion). The HTML site was fine, but the block editor site totally crashed, wouldn’t load at all. I contacted the Arke theme author (see https://wordpress.org/support/topic/updates-292/) and he made some modifications to the Arke theme, and that meant I was able to load the site, but incompletely. I tried disabling all plugins, but that made no difference. So I remained on php 7.4.
So the current situation is when I use php 8.1, the block site only loads only part of the header, in a narrower format, and no content. The site title appears, the header menu shows and works, but not much else. So I’m guessing the fault must be in the header.php file, but I can’t find it so far.
I’d really like to update the php version, but I really don’t know what to look for. Can anyone help me with the following questions please:
(1) Do you agree that if the header only partially shows and nothing else, then it is likely to be the header.php file that is faulty?
(2) It used to work, and still works on php 7.4. This suggests some aspect of php was updated to be more stringent, and bad code which was passed in 7.4 is no longer accepted in 8.1. Does anyone have any suggestions what this might be?
(3) Could there be anything in the php that is treated differently in the classic editor compared to the block editor?Thanks for any suggestions.
The page I need help with: [log in to see the link]
You must be logged in to reply to this topic.