Question

How to upgrade LAMP Stack PHP 5.3 to PHP 5.4

Posted August 28, 2014 5.4k views

https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6

I followed the tutorial above, However I need php 5.4 and not 5.3
How would I upgrade

Yum update php
and yum update does nothing.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

In order to upgrade to a newer version of PHP in CentOS 6, you’ll need to enable some external repositories, EPEL and Remi. You can download the repositories’ information and enable them with:

wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

You can then upgrade PHP with:

yum upgrade --enablerepo=remi php

@asb YOU SAVED MY LIFE IN LESS THAN 3 MIN.

Thankfully updating my PHP version was as simple as running you suggested commands!

Thank you very much for your help.
I can confirm this works :)

Submit an Answer