Installing PHP
summary: Plesk provides support for multiple PHP versions and handler types out of the box.
In this topic you will learn how to install additional PHP versions in Plesk.
Installing and Uninstalling PHP Versions
To install a specific PHP version on the server or remove one from the server, follow these steps:
-
Go to Tools & Settings > Updates (under “Plesk”), and then click Add/Remove Components.
- (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 8.3, 8.2, 8.1, and 7.4 are marked for installation, while PHP version 8.0 - 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 8.3, but only PHP-FPM with PHP 8.1). 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.