Webhosting | Hosting - My Hosting PartnerWebhosting | Hosting - My Hosting PartnerWebhosting | Hosting - My Hosting PartnerWebhosting | Hosting - My Hosting Partner

Updating PHP versions

Updating PHP versions
MijnHostingPartner

Updating PHP versions

Updating the software and underlying technology is an essential part of any healthy website. PHP version 7.4 will no longer be supported with security updates as of November 2022 and will therefore go the way of the dodo. It is therefore advisable to upgrade to the newer PHP versions available before then. We'll explain exactly how this works and how you can make your website fit for the newer PHP versions in this blog post.

PHP is one of the most widely used code languages on the Internet, although more than one language is often used to create a website. PHP is the backend language for many projects. PHP has been released in many versions, and it is always best to use the LTS versions, or Long Term Support. These versions guarantee updates for two years and are therefore suitable for running a production website. WordPress, the most widely used content management system, also makes heavy use of PHP for its underlying code. Therefore, it benefits from every major update that comes out for it. PHP 7.4 has already brought a lot of speed and stability improvements, PHP 8.1 and above will only increase the difference.

Checking if your site is ready for the newer PHP versions

Checking if your site is ready for the newer PHP versions can be a daunting task, but the quickest way to find out is to back up your site. And then increase the PHP version. Some error messages should be displayed and can be determined by turning on the advanced error messages in the code. In many cases, it is a plug-in or a specific component that is not yet ready for the newer PHP versions. The extended error message will tell you which one it is. The file path is always displayed here. This way you can make sure that this component is updated or that you need to find an alternative. More information will follow later in this article.

Updating a PHP version in the customer panel

There are two ways to work on your website. With the switch to a new customer panel some time ago, it is now possible to do a lot of work through the customer panel. This includes the PHP version settings. This is easily done by navigating to my products via the dashboard, then to the website in question and selecting the PHP version for it. This way, the PHP version will be adjusted immediately and you can continue testing your website with the latest PHP version.

Updating PHP versions

Update PHP version in the control panel

The PHP version can also be updated in the Control Panel. If you don't see a newer version, please follow the next article to edit the web.config file. And then check it again. If you are still not able to select a higher PHP version, please send a ticket to our helpdesk. We will make sure that this is the case as soon as possible.

Updating PHP versions

In the Control Panel, you can edit the PHP version under Websites and then select the Extensions tab. The PHP version can be found below this and selected from the dropdown list. You can then save it for further use.

Updating or replacing code and plug-ins/themes.

If you have chosen the higher PHP version, your website may show a 500 error or a white screen, then you know that your website is not ready for it yet. And probably some part needs to be updated. So turn on the advanced error messages, and look at the website again. You should see a stack trace so you can figure out what's going on. In most cases, it's another plugin or component. Search for your error message on Stackoverflow and other help forums to make sure you can update it correctly.

It is important that you contact the manufacturer of the plugin or theme and ask if support for the newer PHP versions is provided. If this is not the case, it is recommended that you urgently look for another solution. As soon as you use an outdated website for a long period of time, there is a risk that something will go wrong. A security hole can be found and abused, turning your website into a malware risk. Don't let this happen and update your code or website regularly! And do your homework for every component you install on yourhosting website.

Want help switching to the latest PHP version? We can further assist you in our overall support with our Site Doctor Lex service. Take a look at our special page for that. You can request help by sending a ticket to the helpdesk.