Recommended PHP version for up to date LEMP

Posted September 19, 2014 4.8k 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.

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.

Submit an Answer
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..