Home › Forums › Weaver Xtreme Theme › Tips on Updating to PHP 8
- This topic has 3 replies, 4 voices, and was last updated 1 month, 3 weeks ago by
laura.
-
AuthorPosts
-
January 11, 2023 at 18:26 UTC - Views: 51 #71552
Weaver
KeymasterPHP 8 is now being used by more (if not most) hosting companies. This is normally a good thing, but it is turning out that unlike PHP 7, PHP 8 is NOT totally backward compatible with older dialects of PHP. It is beyond the scope of this post to explain all the differences, but incompatibilities are found when using some older plugins. These incompatibilities most often result it some sort of crash and error message.
So, here’s the main recommendation:
If you or your host is updating the to any PHP Version 8, please be sure all the plugins you have installed, as well as your theme are updated first (if possible). This will often avoid crashes and errors.
Otherwise, there are clues in the error messages that get produced. You will usually see what is called a Stack Trace which shows a trace of the pieces of what are called PHP functions. Along with the name of a particular file there will be inclued the full director path of the offending code files. What you should look for in all that mess is often a reference to the WordPress plugins directory – something like
some-name-of-the-site-root-directory/wp-content/plugins/plugin-name/plugin-code-file.php
It won’t have those exact names, but the actual names of files, but the idea is to look for the name of a plugin (or theme instead). Such a reference to such a plugin points a finger at that plugin as suspect. The goal would then be to disable that plugin from the WP Admin dashboard to see if the error goes away. Unfortunately, the errors sometimes prevent you from even logging in with your admin account. The alternatives are to possible switch back to an older PHP version to re-enable the dashboard, or use the CPanel or equivalent control interface to delete the plugin from the /plugins directory.
January 11, 2023 at 21:24 UTC - Views: 48 #71553arctexas
ParticipantThanks for this. I’ve been getting some strange errors since I updated to 8. Just downloaded the error file from cPanel now maybe I can figure out what the heck is going on.
January 28, 2023 at 06:14 UTC - Views: 40 #71604hkp
ParticipantAfter your advice, I planned to upgrade to PHP 8.0 this August when our host contract is renewed.
I also decided to learn WP-Blocks, so I installed a second XAMPP PHP 8.0.25 (configured for WP-Blocks) on my PC, and an XAMPP PHP 8.2.0 version for interest, as I read that PHP 8.2 is 47% faster than the 8.0 version.
After installing both and configuring them with Xtreme, I found that the 8.2 version had so many things not working (with just the minimum necessary plugins installed) that I uninstalled it after 30 minutes. It was just not usable for any purpose, testing of otherwise.
From that, I’d say It will take a long while before the 8.2 version is useful with WP and all the WP plugins are updated.
The XAMPP PHP 8.0.25 with a WP-Block configured version worked fine.
BUT then I activated all the plugins I use on our main live site, and got a serious error message from the security plugin.
I checked with the plugin’s WP page and sadly found that despite having >30K active installs, they have not replied to support questions since before its last update, two+ years ago. Yes unfortunately, it looks like the plugin is now abandoned.
So, your advice on thoroughly checking the plugins and their status, is well taken!
It seems that if I want to upgrade to PHP 8.0 in August, I need to find and test a suitable new security plugin first.
FYI, back in Weaver 2 days, my host needed to move our site to a new server and decided to upgrade the PHP at the same time, only to find it would not work. So they wrote later to let me know they had to move us back, after a lot of downtime for their testing etc.. They were not so happy…..
I’d suggest installing XAMPP PHP 8.0.25 on a PC and testing your WP configuration there before asking the host for an upgrade.
It took me less than an hour to download and install XAMPP, configure WP with Xtreme and find that 8.2 did not work and that 8.0.25 has a serious issue for my main live site configuration.
Regards and thanks!
April 11, 2023 at 18:26 UTC - Views: 20 #72385laura
ParticipantThank you so much for the advice in this post about how to track down issues from a PHP upgrade. I haven’t upgraded in a while and this really came in handy especially the part about what’s called a stack trace.
I did have some issues during the upgrade, but it had nothing to do with the theme. It was due to a couple of really old plugins that were no longer compatible. The funny thing is, I also have other plugins that were very old that still function well under PHP 8, so go figure. I guess it’s just a matter of time before those fail, too.
Also, when I got the “white screen of death” with an error message from the upgrade, I found I was able to get control of the website by making a copy of the original .htaccess file and restoring it in the Cpanel. I didn’t need to restore the whole website. I just needed to restore the original .htaccess file and I was able to access the site back at php 7.4 to remove the bad plugins and then change the .htaccess file back to 8.0 to attempt to redo the php upgrade. I was so proud that I did not need to contact my web host to do the upgrade.
Thank you so much.
-
AuthorPosts
- You must be logged in to reply to this topic.