Install latest version of PHP on Ubuntu

PHPI always run the latest LTS version of Ubuntu on all my servers. Currently the latest LTS is 14.04 which comes with PHP version 5.5, but as of November 2014, the latest stable version is 5.6. So how do you get an updated, current version of PHP without resorting to having to maintain the packages yourself? The answer is in PPA.

Updated November 3, 2014

PPA is an acronym for Personal Package Archives and is a means for users to to distribute packages and updates to other users.

First you need add-apt-repository which is in the python-software-properties package:

Then you add Ondřej Surý‘s repository for PHP 5.6:

Finally, it’s as simple as doing a regular upgrade:

And you’re done :-)

Maybe you are also looking for how to install the latest version of Nginx?

There are no comments

I love comments that bring new insights, shares ideas and experiences, and most of all: corrects my mistakes. For support questions, there are other fora, like Stack Overflow, Server Fault and the WordPress support forum.

Your email address will not be published. Required fields are marked *