Question
How to install/remove additional PHP versions provided by Plesk?
Answer
Additional PHP versions can be installed/removed by a Plesk administrator only. This can be done either via a Plesk interface (web-browser) or a command-line interface directly on a Plesk server.
Note: Modern operating systems do not support PHP 5.6 and lower versions. Visit this KB article for details.
Note: Make sure that port 8447 is opened in firewall. If it is closed and cannot be opened, use the command-line instructions.
-
In Plesk, go to Tools & Settings and click Updates (Updates and Upgrades).
-
On the Updates and Upgrades page, click Add/Remove Components.
-
On the Add/Remove Components page, expand:
-
Web hosting > PHP interpreter versions section, if this is a Linux server.
-
Plesk hosting feature section, if this is a Windows server.
-
-
Select required PHP versions for installation/uninstallation and click Continue.
-
Connect to a Plesk server via SSH (Linux) / RDP (Windows Server).
-
Get the list of all available Plesk components (on Windows Server, use a command prompt as an Administrator):
MYSQL_LIN: plesk installer –select-release-current –show-components
-
Install/remove additional PHP versions using the component name from step 2.
Example of the command to install PHP 7.4:
Note: PHP 7.4 is available starting from Plesk Obsidian 18.0.21 Update 4.
-
for Linux:
# plesk installer add –components php7.4
-
for Windows Server:
C:> plesk installer add –components php74
Example of the command to remove PHP 5.6:
-
for Linux:
# plesk installer remove –components php5.6
-
for Windows Server:
C:> plesk installer remove –components php56
-