Recommended PHP version for up to date LEMP

September 19, 2014 4.2k views

I am currently running Debian 7.6, PHP 5.4.4, Wordpress 4.0 and Nginx 1.2.1.

Should I install PHP 5.5 or 5.6? Neither seems to be available in the Debian repositories yet.

I don’t particularly want to break anything and I am not interested in extra labor, but then again, my droplet will have a lot more stuff on it in several months and now would be the time to upgrade PHP without danger of screwing up too many things.

2 Answers

I would recommend installing PHP 5.6, since it will keep backwards compatibility and you should not have problems unless you are running really old stuff.

You can use this PPA. To add the PPA, run:

$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:ondrej/php5-5.6
$ sudo apt-get update

And then proceed with the web server installation.

ProTip: create a snapshot of your droplet, if you run into problems you can restore it to a new droplet.

Hi Igor,

According to the PHP release process, they will be bugs and security fixes until 1. March 2015.

Wordpress is know to keep BC and should work with PHP 5.5 / 5.6. I advice you to upgrade at least to php 5.5.

But be aware that you can have problems with some 3rd part plugins..

Have another answer? Share your knowledge.