- Plesk for Linux
How to upgrade OS vendor PHP (system PHP) on CentOS 7?
Note: By default, PHP used for Plesk webmail (Horde, Roundcube) is installed from the repository of the OS vendor. You can install PHP from an alternative repository following the repository maintainers' instructions, provided that the PHP package names remain the same. Installing PHP from a repository that changes the names of PHP packages (for example, IUS, Webtatic) will prevent Plesk webmail from operating correctly and will cause dependency issues.
Such PHP upgrade is a purely administrative task. However, our team can handle it, for that, please contact Plesk Professional Services team.
If the system does not have newer versions of PHP packages in official repositories - it should be compiled manually or installed from 3rd-party repositories. Below the instruction how to upgrade PHP to version 7 using 3rd-party repository (adjust commands accordingly if it is required to perform an upgrade to a different version):
- Connect to the server using SSH.
- Enable EPEL repository:
# yum install epel-release
- Download Remi repository package:
# wget https://rpms.remirepo.net/enterprise/remi-release-7.rpm
- Enable Remi PHP repo:
# rpm -ivh remi-release-7.rpm
- Make sure
yum-utilspackage is installed and enable appropriate Remi repository. As an example to upgrade OS vendor PHP to version 7 enable the following repository:
# yum-config-manager --enable remi-php70
- Update php package:
# yum update php