Articles in this section

How to install or remove additional Plesk PHP versions on a Plesk server?

Plesk for Windows kb: how-to Plesk for Linux

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

Question

  • How to install or remove additional Plesk PHP versions on a Plesk server?

Answer

Note: The list of PHP versions available for installation via the Plesk Installer can be viewed in this KB article.

Note: Make sure that port 8447 is opened in firewall in order to access the Plesk GUI Installer. If it is closed and cannot be opened, use the command-line instructions below as an alternative.

  1. Log into Plesk
  2. Go to Tools & Settings > Plesk > Updates

     
  3. Once you access the Install and Update page, click Add/Remove Components.


     
  4. When at the Add/Remove Components page, do the following:

    For Linux

    Go to Web hosting > PHP interpreter versions section and change the ❌ (cross) to a (tick) for all Plesk PHP versions that you want to use by selecting Install via their dropdown menu

    For Windows

    Go to the Plesk hosting features section and change the ❌ (cross) to a (tick) for all Plesk PHP versions that you want to use by selecting Install via their dropdown menu

  5. Scroll down to the bottom and press Continue
Installing or removing additional PHP versions via commands

1. Connect to a Plesk server via SSH (Linux) or RDP (Windows)

2. Run the following command to get the list of all available Plesk components:

Note: The command is the same on Linux and Windows servers, for Windows, you must first run Command Prompt as an Administrator in order to execute it

For Linux:

# plesk installer --select-release-current --show-components

For Windows:

C:\> plesk installer --select-release-current --show-components

The output will list Plesk components and their exact names, including PHP versions, similarly to the following:

 php56             [install] - PHP 5.6 script engine (outdated)
 php70             [install] - PHP 7.0 script engine (outdated)
 php71             [install] - PHP 7.1 script engine (outdated)
 php72             [install] - PHP 7.2 script engine (outdated)
 php73             [install] - PHP 7.3 script engine (outdated)
 php74             [install] - PHP 7.4 script engine
 php80             [install] - PHP 8.0 script engine (outdated)
 php81             [install] - PHP 8.1 script engine (outdated)
 php82             [install] - PHP 8.2 script engine
 php83             [up2date] - PHP 8.3 script engine
 php84             [up2date] - PHP 8.4 script engine
 php85             [install] - PHP 8.5 script engine

3. Install or remove additional PHP versions using the component name you saw from the output of the previous command

  • Example of the command to install PHP 8.3:

For Linux:

# plesk installer add --components php8.3

For Windows:

C:\> plesk installer add --components php83

  • Example of the command to remove PHP 7.0:

For Linux:

# plesk installer remove --components php7.0

For Windows:

C:\> plesk installer remove --components php70

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.