Changing your website’s PHP version
In the hosting control panel you can set which PHP version your website uses. PHP is the programming language that runs in the background of a great many websites, such as WordPress, online shops and contact forms. The version you choose determines how fast and how securely your website runs, and whether certain software works well with it.
In this article we explain how to change the PHP version, how to restart PHP, and why that is a sensible step in many cases.
Why change the PHP version?
PHP is constantly being developed. Every new version brings improvements. The main reasons to move to a newer version:
Speed. Newer PHP versions process code noticeably faster. Your website loads more smoothly and can handle more visitors at once, without you having to change anything else.
Security. At some point, older PHP versions stop receiving security updates. They then become “end of life”. If you keep running on them, your website is at greater risk of abuse. A supported version still receives updates and therefore remains better protected.
Compatibility. Many software packages, plugins and themes require a minimum PHP version. WordPress and other systems actively recommend using a recent version. On a version that is too old, components may stop working or produce error messages.
Sometimes you actually need to choose a slightly older version, for example when custom code or a specific plugin is not yet ready for the very latest version. That is another reason why it is handy to be able to set the version yourself.
Which version do we recommend?
We currently recommend PHP 8.3 or 8.4. These versions offer a good combination of speed and security and are supported by virtually all current software. Not sure which of the two suits your website best? Feel free to get in touch with us.
Restarting PHP: handy when CPU load is high
Sometimes a PHP process gets stuck. This can happen, for example, because of a plugin that freezes or does not shut down properly. Such a stuck process can drive up the CPU load, making your website slower or putting a heavier load on the server.
In that situation you don’t need to go looking for the cause straight away. It is often quicker and easier to simply restart PHP. This closes the stuck processes and PHP starts again with a clean slate. The CPU load then usually drops back to a normal level.
An alternative is to briefly switch PHP version and then switch back if needed. Such a switch also restarts the running PHP processes, with the same effect: stuck processes disappear.
If the high CPU load keeps coming back after a restart, the cause probably lies in a specific plugin or in custom code. It is then wise to investigate further which component is causing the problem.
Before you start
A few points to bear in mind:
- Preferably make a backup of your website first, so you can always return to the previous situation.
- Check which PHP version your software supports. For WordPress, you can usually find this information in the admin area or on the website of your theme or plugins.
- Ideally change the version at a quiet moment, not during peak hours, so that any problems affect fewer visitors.
How to change the PHP version
- Log in to the hosting control panel at https://cp.vcloudhosting.eu.
- Go to the section where your domains or websites are displayed.
- Look for the option for PHP settings or PHP version. It is usually called something like “Select PHP version” or “PHP management”.
- Select the PHP version you want from the drop-down menu. We currently recommend 8.3 or 8.4.
- Save your choice. The change usually takes effect immediately.
- Then check your website. Click through a few pages and test important features such as forms, the login and the online shop.
How to restart PHP
- Log in to the hosting control panel at https://cp.vcloudhosting.eu.
- Go to your website’s PHP settings.
- Choose the option to restart PHP. If you don’t have that option, you can instead briefly switch PHP version and then switch back.
- Wait a moment and check whether your website is running smoothly again and whether the CPU load has dropped.
What if something doesn’t work?
Do you get error messages after the change, or has something stopped working? Then temporarily set the previous PHP version again using the same steps. Your website will then work as before. You can then calmly work out which plugin or component is not yet ready for the newer version.
Need help?
Stuck, or want to be sure of your choice? Then contact us at support@kyzoe.be. We are happy to help and can carry out the change or a restart for you if you wish.