Definition
PHP is the programming language used by most CMS (WordPress, Joomla, PrestaShop). It's important to use the most recent version compatible with your site to guarantee optimal performance and security.
PHP versions
PHP evolves over time: performance and security improvements, new features, etc.
So.., it's always best to use the most recent PHP version possible compatible with your PHP scripts and update your site to support new versions. In this way, you can be sure of additional security and performance.
LRob makes every effort to offer you the latest versions of PHP as soon as possible: On our shared servers, they are generally available within the week of release.
An up-to-date list of supported PHP versions can be found on the official : https://www.php.net/supported-versions.php
Choosing a PHP version
LRob lets you choose your own PHP version. This is an advantage, because you can use the script of your choice with the PHP version of your choice, and the latest PHP versions are available very quickly from LRob.
Nevertheless, there is one rule to follow for optimum safety and performance: You should therefore use the most recent version of PHP supported by your script.
To set your PHP version:
- Visit your Plesk control panel
- Under your domain, go to "PHP settings".
- Select the desired PHP version, and confirm with "OK".
- After a few seconds, the PHP version is active
- Check that your site is working properly before deciding whether or not to keep this version.
PHP handlers
The server distributing web files is generally Apache.
Apache only distributes files and is not natively capable of executing PHP code. PHP is therefore executed by Apache via what is known as a "handler".
The oldest PHP handler was mod_php, an Apache extension for executing PHP; files had to be owned by Apache for PHP to write to web files.
Then came CGI and FastCGI, which deliver much better performance, but above all let the files belong to the user corresponding to the site, thus allowing greater independence of sites on a server and therefore better security. FastCGI cuts page loading times in half compared with mod_php, while at the same time offering significant security gains.
FPM (or "Application PHP" in French) is the latest handler, used by default in CentOS 7 for even higher performance and better management of each site's resources. FPM generates one instance per PHP version. FPM also has the advantage of allowing you to individually set the maximum number of simultaneous FPM processes (i.e. PHP executions) for each site, as well as the number of "spare" processes (i.e. waiting to be connected). Several modes are available, adjustable via the domain's PHP settings when FPM is selected. The default is "ondemand", i.e. no process is launched if there is no request in progress, but it is possible to pre-launch FPM handlers (at the cost of a little RAM) to slightly speed up response times.
Since Plesk Obsidian 18.0.39 (October 13, 2021), you can also choose "Dedicated FPM". Dedicated FPM allows you to have an independent FPM service/handler for a site. Technically, this translates into an additional system process (a "service"). At the cost of a little RAM usage, this slightly improves handler launch speed, and therefore site loading speed, improving the "TTFB" metric (initial server response time) by a few milliseconds. The dedicated FPM option is therefore best used on very high-traffic or critical sites. The difference is of the order of a few % in loading speed, particularly on FPM-intensive applications such as Nextcloud. In the end, while the difference may be interesting, it remains relatively marginal compared with what optimizing the site's code or a Redis cache can achieve.
Note that handler settings, like all PHP settings, can be defined at the level of Plesk service packs (30-domain license or higher).
Related pages :