How can I Update my ubuntu server to PHP 7 ?

December 4, 2015 6.3k views

How can I Update my ubuntu server to PHP 7 ?

1 comment
2 Answers


It really depends, how did you go about performing your current PHP setup and what implementation are you using (i.e. Apache + mod_php, NGINX + PHP-FPM etc)?

The best way to go about it will be a manual build from the CLI where you’d download the source, run ./configure … (where would expand to be a number of configuration options) and compile from the source. This gives you the most options and the maximum customization options (so that you’re not needlessly installing packages that you do not need, or extensions).

Until better instructions arrive from the amazing people who write DigitalOcean tutorials, this may help. …It’s a total build (not an update) but you can decipher which portions are different from your own build, and adapt as needed. On my LEMP configuration I was able to jump right in from the heading that says “Add Zend repo and install PHP7”.

Have another answer? Share your knowledge.