Skip to main content

PHP 7

(2021-02-23)

Installing PHP 7

Instructions for7.4

Older information

(2017-09-13)

CentOS 7 provides PHP version 5.4 in its official repository.

Command to install the Remi repository configuration package:

yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

Command to install the yum-utils package (for the yum-config-manager command):

yum install yum-utils

You want a single version which means replacing base packages from the distribution

Packages have the same name than the base repository, ie php-*

PHP version 7.1 packages are available for CentOS 7 in remi-php71 repository

Command to enable the repository:

yum-config-manager --enable remi-php71

Command to upgrade (the repository only provides PHP):

yum update