Plesk provides support for multiple PHP versions and handler types out of the box. This topic explains how the Plesk administrator can install PHP on the server.
To install a specific PHP version on the server or remove one from the server, follow these steps:
Go to Tools & Settings > Updates, and then open the Add/Remove Components tab.
- (Plesk for Linux) Expand the Web hosting section, and then the PHP interpreter versions section.
- (Plesk for Windows) Expand the Plesk hosting features section.
Here, currently installed PHP versions are marked with a green checkbox icon, and those currently not installed with a red cross icon. Select the PHP versions you want to install by clicking the corresponding icon > Install. Select the PHP versions you want to remove by clicking the corresponding icon > Remove. On the screenshot below, PHP versions 7.3, 7.2, and 7.1 are marked for installation, while PHP versions 7.0 and 5.6—for removal.
Click Continue to install/remove the selected PHP versions.
Whenever a PHP version is installed, Plesk automatically configures the standard PHP handler types (CGI, FastCGI, PHP-FPM) for it.
Note: On older OSes (for example, CentOS 6.x), it is necessary to install the PHP-FPM support from OS vendor component to enable the use of the PHP-FPM handler. The component can be found on the Add/Remove Components tab in the Web hosting > Nginx web server and reverse proxy server section.
Note: On newer OSes (for example, Debian 9), older PHP versions (5.6 and earlier) may not be available for installation because they are not compatible with the modern OpenSSL versions those OSes ship with.
You can make certain handler types available or unavailable to your customers for every PHP version installed on the server (for example, you can allow your customers to use both FastCGI and PHP-FPM with PHP 7.1, but only PHP-FPM with PHP 5.6). You can also configure PHP settings for every PHP version individually.
Note: In Plesk Obsidian and later, the system PHP component is no longer mandatory. You can now:
- Install Plesk without the system PHP component.
- Remove the system PHP component after you install or upgrade to Plesk Obsidian.
- Install and use custom PHP builds instead of the system PHP component.
- Install Horde without the system PHP component.