Plesk incorporates its versions of PHP that are usually the current ones and supported by PHP itself. But what if we want to use the PHP of the operating system itself or other versions?
In this case, for example if you need for some reason a PHP 5.6, we can activate and configure our PHP configurations.
This tutorial has been created on a Clouding.io VPS. You can create your own VPS from 3€/month.
In addition, you have the possibility to create your VPS with the WordPress image in one click.
PARTNERSHIP
This tutorial has been created thanks to a Plesk license.
Get your Plesk licenses from their website or from your hosting provider.
PARTNERSHIP
To do this whole process we will partially use an SSH access and the Plesk panel.
Laying the foundation
The first thing we will do is update the operating system and validate that everything is up to date.
apt -y update && apt -y upgrade && apt -y dist-upgrade && apt -y autoremove
Once we do this we can validate that all PHP versions of Plesk itself are up to date from the Plesk Installer.

Do we need to activate php from OS vendor? In principle no, because we are going to install our own versions and not properly that of the operating system.
To validate what is installed, we can make a list.
plesk bin php_handler --list
That returns us a list such that this.
id: display name: full version: version: type: cgi-bin: php-cli: php.ini: custom: status:
plesk-php73-cgi 7.3.28 7.3.28 7.3 cgi /opt/plesk/php/7.3/bin/php-cgi /opt/plesk/php/7.3/bin/php /opt/plesk/php/7.3/etc/php.ini true disabled
plesk-php73-fastcgi 7.3.28 7.3.28 7.3 fastcgi /opt/plesk/php/7.3/bin/php-cgi /opt/plesk/php/7.3/bin/php /opt/plesk/php/7.3/etc/php.ini true disabled
plesk-php73-fpm 7.3.28 7.3.28 7.3 fpm /opt/plesk/php/7.3/sbin/php-fpm /opt/plesk/php/7.3/bin/php /opt/plesk/php/7.3/etc/php.ini true enabled
plesk-php74-cgi 7.4.18 7.4.18 7.4 cgi /opt/plesk/php/7.4/bin/php-cgi /opt/plesk/php/7.4/bin/php /opt/plesk/php/7.4/etc/php.ini true disabled
plesk-php74-fastcgi 7.4.18 7.4.18 7.4 fastcgi /opt/plesk/php/7.4/bin/php-cgi /opt/plesk/php/7.4/bin/php /opt/plesk/php/7.4/etc/php.ini true disabled
plesk-php74-fpm 7.4.18 7.4.18 7.4 fpm /opt/plesk/php/7.4/sbin/php-fpm /opt/plesk/php/7.4/bin/php /opt/plesk/php/7.4/etc/php.ini true enabled
plesk-php80-cgi 8.0.5 8.0.5 8.0 cgi /opt/plesk/php/8.0/bin/php-cgi /opt/plesk/php/8.0/bin/php /opt/plesk/php/8.0/etc/php.ini true disabled
plesk-php80-fastcgi 8.0.5 8.0.5 8.0 fastcgi /opt/plesk/php/8.0/bin/php-cgi /opt/plesk/php/8.0/bin/php /opt/plesk/php/8.0/etc/php.ini true disabled
plesk-php80-fpm 8.0.5 8.0.5 8.0 fpm /opt/plesk/php/8.0/sbin/php-fpm /opt/plesk/php/8.0/bin/php /opt/plesk/php/8.0/etc/php.ini true enabled
What we want is to include our own versions to this list.
Installing Ubuntu PHP
We will activate the most well-known repository to support PHP.
add-apt-repository -y -s ppa:ondrej/php
And we will install the following versions. The first of these, PHP 5.6.
apt -y install php5.6 php5.6-apcu php5.6-bcmath php5.6-cgi php5.6-cli php5.6-common php5.6-curl php5.6-dba php5.6-dev php5.6-fpm php5.6-gd php5.6-gmp php5.6-http php5.6-igbinary php5.6-imagick php5.6-imap php5.6-intl php5.6-json php5.6-mbstring php5.6-mcrypt php5.6-msgpack php5.6-mysql php5.6-mysqlnd-ms php5.6-opcache php5.6-redis php5.6-soap php5.6-ssh2 php5.6-tidy php5.6-uploadprogress php5.6-xml php5.6-xmlrpc php5.6-xsl php5.6-zip
Also PHP 7.3.
apt -y install php7.3 php7.3-fpm php7.3-cgi php7.3-common php7.3-dev php7.3-cli php7.3-bcmath php7.3-curl php7.3-gd php7.3-imap php7.3-json php7.3-mbstring php7.3-mysql php7.3-opcache php7.3-soap php7.3-xml php7.3-xmlrpc php7.3-zip php-imagick php-pear php-ssh2 php-xdebug libgeoip-dev
Also PHP 7.4.
apt -y install php7.4 php7.4-fpm php7.4-cgi php7.4-common php7.4-dev php7.4-cli php7.4-bcmath php7.4-curl php7.4-gd php7.4-imap php7.4-json php7.4-mbstring php7.4-mysql php7.4-opcache php7.4-soap php7.4-xml php7.4-xmlrpc php7.4-zip php-imagick php-pear php-ssh2 php-xdebug libgeoip-dev
And finally, PHP 8.0.
apt -y install php8.0 php8.0-fpm php8.0-cgi php8.0-common php8.0-dev php8.0-cli php8.0-bcmath php8.0-curl php8.0-gd php8.0-imap php8.0-mbstring php8.0-mysql php8.0-opcache php8.0-soap php8.0-xml php8.0-zip php8.0-xdebug php8.0-imagick
Now that we have our versions, we are going to activate (only the FPM versions, but the CGI could also be activated) so that Plesk can use them.
We will activate as needed. The first will be PHP 5.6.
plesk bin php_handler --add -displayname '5.6-FPM (Ubuntu)' -path /usr/sbin/php-fpm5.6 -phpini /etc/php/5.6/fpm/php.ini -type fpm -id fpm56 -clipath /usr/sbin/php-fpm5.6 -service php5.6-fpm -poold /etc/php/5.6/fpm/pool.d
Also PHP 7.3.
plesk bin php_handler --add -displayname '7.3-FPM (Ubuntu)' -path /usr/sbin/php-fpm7.3 -phpini /etc/php/7.3/fpm/php.ini -type fpm -id fpm73 -clipath /usr/sbin/php-fpm7.3 -service php7.3-fpm -poold /etc/php/7.3/fpm/pool.d
We continue with PHP 7.4.
plesk bin php_handler --add -displayname '7.4-FPM (Ubuntu)' -path /usr/sbin/php-fpm7.4 -phpini /etc/php/7.4/fpm/php.ini -type fpm -id fpm74 -clipath /usr/sbin/php-fpm7.4 -service php7.4-fpm -poold /etc/php/7.4/fpm/pool.d
And we end up with PHP 8.0.
plesk bin php_handler --add -displayname '8.0-FPM (Ubuntu)' -path /usr/sbin/php-fpm8.0 -phpini /etc/php/8.0/fpm/php.ini -type fpm -id fpm80 -clipath /usr/sbin/php-fpm8.0 -service php8.0-fpm -poold /etc/php/8.0/fpm/pool.d
We will validate the list again.
plesk bin php_handler --list
Where we should appear the new identifiers that we have added.
id: display name: full version: version: type: cgi-bin: php-cli: php.ini: custom: status:
fpm56 5.6-FPM (Ubuntu) 5.6.40 5.6 fpm /usr/sbin/php-fpm5.6 /usr/sbin/php-fpm5.6 /etc/php/5.6/fpm/php.ini true enabled
fpm73 7.3-FPM (Ubuntu) 7.3.28 7.3 fpm /usr/sbin/php-fpm7.3 /usr/sbin/php-fpm7.3 /etc/php/7.3/fpm/php.ini true enabled
fpm74 7.4-FPM (Ubuntu) 7.4.18 7.4 fpm /usr/sbin/php-fpm7.4 /usr/sbin/php-fpm7.4 /etc/php/7.4/fpm/php.ini true enabled
fpm80 8.0-FPM (Ubuntu) 8.0.5 8.0 fpm /usr/sbin/php-fpm8.0 /usr/sbin/php-fpm8.0 /etc/php/8.0/fpm/php.ini true enabled
plesk-php73-cgi 7.3.28 7.3.28 7.3 cgi /opt/plesk/php/7.3/bin/php-cgi /opt/plesk/php/7.3/bin/php /opt/plesk/php/7.3/etc/php.ini true disabled
plesk-php80-fpm 8.0.5 8.0.5 8.0 fpm /opt/plesk/php/8.0/sbin/php-fpm /opt/plesk/php/8.0/bin/php /opt/plesk/php/8.0/etc/php.ini true enabled
plesk-php80-cgi 8.0.5 8.0.5 8.0 cgi /opt/plesk/php/8.0/bin/php-cgi /opt/plesk/php/8.0/bin/php /opt/plesk/php/8.0/etc/php.ini true disabled
plesk-php74-cgi 7.4.18 7.4.18 7.4 cgi /opt/plesk/php/7.4/bin/php-cgi /opt/plesk/php/7.4/bin/php /opt/plesk/php/7.4/etc/php.ini true disabled
plesk-php73-fpm 7.3.28 7.3.28 7.3 fpm /opt/plesk/php/7.3/sbin/php-fpm /opt/plesk/php/7.3/bin/php /opt/plesk/php/7.3/etc/php.ini true enabled
plesk-php80-fastcgi 8.0.5 8.0.5 8.0 fastcgi /opt/plesk/php/8.0/bin/php-cgi /opt/plesk/php/8.0/bin/php /opt/plesk/php/8.0/etc/php.ini true disabled
plesk-php74-fpm 7.4.18 7.4.18 7.4 fpm /opt/plesk/php/7.4/sbin/php-fpm /opt/plesk/php/7.4/bin/php /opt/plesk/php/7.4/etc/php.ini true enabled
plesk-php74-fastcgi 7.4.18 7.4.18 7.4 fastcgi /opt/plesk/php/7.4/bin/php-cgi /opt/plesk/php/7.4/bin/php /opt/plesk/php/7.4/etc/php.ini true disabled
plesk-php73-fastcgi 7.3.28 7.3.28 7.3 fastcgi /opt/plesk/php/7.3/bin/php-cgi /opt/plesk/php/7.3/bin/php /opt/plesk/php/7.3/etc/php.ini true disabled
Selecting from Plesk
If we go to the PHP configuration of our domain, we will now have the possibility to select different versions, including our new PHP versions.
The interesting thing is that we can have a php configuration.ini different from the one that comes by default with Plesk, configured in our own way and with the extensions that we decide.

About this document
This document is regulated by the EUPL v1.2 license, published in WP SysAdmin and created by Javier Casares. Please, if you use this content in your website, your presentation or any material you distribute, remember to mention this site or its author, and having to put the material you create under EUPL license.