· intoPanel Team · 2 min read
Choosing PHP versions for a shared hosting server
Which PHP versions to install side by side, how to move websites between them safely, and how to keep old versions from becoming a security problem.
Every shared hosting server ends up running more than one PHP version. New websites want the newest release; an old shop or a custom application may only work on an older one. intoPanel installs PHP 7.4 and 8.0 to 8.5 side by side, from the Remi repository, each with its own PHP-FPM service. The question is which ones you should offer.
A sensible default#
For most servers today:
- PHP 8.3 or 8.4 as the default for new websites. Both are fast, current, and supported by WordPress and the common shop systems.
- The newest version available for customers who want it, once their software supports it.
- One older version only for the websites that still need it, with a plan to move them.
Why not keep every version?#
Each installed version is more to update, and every PHP release eventually stops receiving security fixes. A version past its end of life still runs, but new vulnerabilities in it are never fixed. The fewer old versions you run, the smaller that risk.
Moving websites between versions#
- In the admin area, open Software → PHP Version per Domain. It lists every website with its account and PHP version.
- Move a test copy first, or move one website and check it, including its admin pages and forms.
- Watch the website's
error_logfile for deprecation warnings and fatal errors. - Move the rest in groups.
A PHP version that websites still use, or that webmail and phpMyAdmin run on, is never removed by the Web Stack Manager: it tells you how many websites still use it.
Extensions per version#
Extensions are installed per version, so when you add a new version, install the extensions your websites need for it too. The Web Stack Manager offers to copy the extensions of your other versions when you tick a new one. Heavy extensions such as imagick or ioncube-loader can be made optional, so only the websites that tick them load them.
Let customers choose#
Clients can choose the PHP version of each of their websites themselves, within the versions you installed. That keeps the decision with the people who know their code, while you decide which versions are on offer.