How can I Update my ubuntu server to PHP 7 ?

How can I Update my ubuntu server to PHP 7 ?

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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”.


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).