1. Intro

Steps to upgrade from php v5.3.3 (CentOS 6.10 default) to php v7.1.


2. Why upgrade?

Because of

We'll use the Webtatic repo for this. Webtatic seems to be the most practical and stable to use for this purpuse. They also have the clearest and to the point howto-guides on the interweb!


3. The Procedure

If php v5.3 is already installed, follow these steps.

# yum install epel-release
# rpm -Uvh
yum install yum-plugin-replace
# # yum replace php-common --replace-with=php71w-common

Now what happens is that the yum-replace plugin will check what php modules are already installed and simply replace them with php 7.1.


If php wasn't already installed, use these steps instead.

# yum install epel-release
# rpm -Uvh
# yum install php71w-common

Install other modules as necessary. Php-common is however the base install.

For both alternatives, after install and-or upgrade check and edit /etc/php.ini for any custom changes you may have made before upgrading or installing.

Common changes includes eg



4. Sources


Hits: 4962