It is worth taking care of the current version of PHP. How should it be changed correctly?

Programming technologies are changing all the time. The websites of our clients are written practically 100% in PHP language. PHP is a very dynamic programming language.

Recently, its development has significantly accelerated. New versions of PHP are released by their developers practically every year. But also, old versions of PHP are being dropped and further undeveloped.

Usually, for a while, the old versions of PHP still have support, and when critical bugs and security vulnerabilities appear in them, they are “patched”.

But recently the support period for old PHP versions has also been shortened. Unfortunately, the shortened support period probably means inconvenience for site owners. Because PHP versions need to be updated, and consequently, it is often necessary to modify or rebuild the code of a website.

Out-of-date PHP version – vulnerability to website hacking

Please take care to the version of PHP your website is running on. This is important, because if your website is running on a version that no longer has any support for the release of security patches, the moment someone discovers a vulnerability in this version of PHP – your website may suddenly become vulnerable to hacking. Such a hack can sometimes involve a personal data breach (RODO) if your site stores such data (e.g. in a database).

This will be of particular security concern for online shops. If necessary, it is worth asking your software provider if it is safe to upgrade the PHP version on the server so that your online shop runs smoothly and securely.

Currently, there is only support for PHP versions: 8.1, 8.2, 8.3.
The PHP developers give exact dates until when a specific PHP version will be supported.
The data is at: https://www.php.net/supported-versions.php

Changing the PHP version in cPanel

In order to change the PHP version, you can go to the cPanel administration panel to the “MultiPHP Manager”. PHP versions can be set individually for each of your own domains.

Then, in the panel displayed, you can select the domain or sub-domain for which the PHP version is to be changed. You can select the chosen PHP version from the drop-down menu and then click “Apply“.

On our servers the PHP version can be set individually for each domain, so we can set a different PHP version for each domain. With some hosting providers you can only change the PHP version for the entire hosting account.

Adapting website to new PHP versions

Please remember that the website for which the PHP version is being changed must correctly support this version of PHP. For popular systems like WordPress, usually by upgrading to the latest version, it will support the latest PHP versions straight away. However, it is worth making sure that themes and plugins support newer versions of PHP – you can ask their developers.

Of course, you can always ‘try’ to change the PHP version for a particular domain and see if everything works. If something does not work then you can back to the previous version conveniently, with one click. You should then contact the company that made the site to ask what needs to be done to make the site secure and support higher PHP versions.

Please note the version of PHP you are using. This has a direct impact on the security of your website or online shop.

New versions of PHP are faster.

It is also worth remembering that each newer version of PHP is slightly faster than previous versions, so it is sometimes easy to speed up your site.