How to upgrade PHP to v5.5 in Ubuntu 12.04

I saw that Zend Opcode is now baked into PHP 5.5 so am keen to apgrade my Virtualmin / LAMP install.

Is this relatively easy and how do I go about it (remembering I’m a greenhorn to command line Linux / VPS)

Thanks for helping.

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.

I was able to update to PHP 5.5 following the instructions on But by upgrading to Apache 2.4, the config file got overwritten. And I didn’t know what to change to keep it working.

Luckily, I took a Snapshot before upgrading and then I restored from Snapshot. So everything’s back to normal now.

I followed the instructions at and the only hiccup I found was that by default PHP was disabled in user home directories, where my document root happened to be. Commenting out that block in /etc/apache2/mods-available/php5.conf fixed it for me.

I don’t think you can install a Debian Wheezy/Squeeze/etc repo on Ubuntu, however the guy that maintains also maintains an Ubuntu PPA with the same packages: <br> <br>ppa:ondrej/php5: