Replace PHP on centos 6 to php 5.6

Replace PHP on centos 6 to php 5.6

CentOS 6 has support until 2020, however scripts like magneto are starting to require newer PHP versions.

Using webtatic.com RPM repo you can update your server to PHP 5.6.

Difficulty medium. If you have live data it is recommended to contact support for this upgrade for assistance.

1) install the RPM from webtatic

rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

2) get a list of current PHP rpm’s.

rpm -a | grep -i ^php

Keep this list, as you will want to match the RPM list after uninstalling PHP and upgrading to php 5.6.

3) Remove the old rpm’s (this varies based on what you have installed)
yum remove php-common php php-gd php-xml

4) Install PHP 5.6 (below is listed the most common modules, adjust as needed)

yum install -y php56w php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbstring

5) restart apache

service restart httpd
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Configure and Install Varnish on CentOS/Ubuntu.

Configure and Install Varnish on CentOS/Ubuntu. In this tutorial we can check how to Configure...

About Zabbix

About Zabbix Zabbix is an open source network monitoring tool. It works with a centralized...

Apache HTTPD Web Server – Details and Installation

Apache HTTPD Web Server – Details and Installation Apache HTTPD is one of the most used web...

Configure and Install PostgreSQL on CentOS 7 and 8

Configure and Install PostgreSQL on CentOS 7 and 8 Configure and Install PostgreSQL on CentOS 7...

Create and Install Self-Signed SSL Certificate on CentOS and Ubuntu

Create and Install Self-Signed SSL Certificate on CentOS and Ubuntu SSL certificate stands for...