Installing PHP¶
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.
Installing and uninstalling PHP¶
To install a specific PHP version on the server or remove one from the server, follow these steps:
Go to Tools & Settings > Updates and Upgrades, 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 7.1 is marked for installation, and PHP 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.