Did you get an email from your hosting company telling you to raise the current PHP version? Or that they are raising the PHP version for you soon?
What does this mean for you? Is raising the PHP version really necessary? What now if your website crashes on php 8 and higher?
We are going to answer this for you!
Is raising PHP version really necessary?
Yes, the reason is that PHP 7.4 is no longer supported as of November 28, 2022. Thus, there will be no more security updates for PHP 7.4 from this date.
How big an impact does PHP have on your website?
PHP is a programming language in which most of WordPress is written.
Every element in WordPress, every piece of information in your website is processed by PHP. And additionally a bit by html, css and some ajax/jQuery.
What should you do with PHP version 7.4 or lower?
If your web host expects you to increase the php version on the server, it is a matter of logging into your hosting panel, or directadmin/cpanel or plesk and going to the php settings there.
You will often see a dropdown that shows 7, 7.4 or in the worst case even 5.6.
Set it to 8.0 or preferably the latest one like 8.4 or higher.
Can’t figure it out? Consult the hoster’s documentation, contact their support department or hire a professional to do it for you.
But what if your site doesn’t work on PHP 8.0 or higher?
Some themes and plugins are not updated by the developers. Those themes and plugins then still work on PHP 7 but crash when you switch to PHP 8 and above….
How do you know if your website is not ready for php 8.0 and higher?
If there are plugins or themes on your site that have not been fully updated, chances are that this will cause the following error message on one of your pages:
What to do with this critical error?
This error message that WordPress shows you by default will not help you any further.
To understand where the error is occurring, you can look in the logs:
- The error log at your host
Consult the error log at your host. What is the error log? The error log is the log file that contains the PHP errors. This contains not only the information about the specific error and where it specifically goes wrong, but also the path in that error code then tells you where it goes wrong.
- The WP Debug mode
Another option is to set WP_DEBUG to “true” in the wp-config.php file. This file is located in the folder where your WordPress is installed on the server. You can access the files via (S)FTP or if your host’s control panel has a file management option, you can also make changes that way.
The error usually comes from a theme or plugin… that hasn’t been updated yet.
Make sure all plugins and your theme are updated. And when possible, only perform the PHP update after that. If everything in your website is up to date, but still errors occur due to 1 of the plugins or theme…. Contact the developer of the plugin or theme.
If they do not respond, do not offer a solution, or indicate that the problem is not caused by them, you can contact a professional who may be able to solve the error for you.