Question

Upgrading Ubuntu to PHP 5.6.4

  • Posted on January 7, 2015
  • ZombayAsked by Zombay

My Ubuntu ownCloud 7.0.4 on 14.04 server is currently running PHP 5.5.9 and I am looking to upgrade to 5.6.4. Are there any simple ways to upgrade ?

Thanks, Zombay.

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.

The right way: Check

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get -y install php5.6 php5.6-mcrypt php5.6-mbstring php5.6-curl php5.6-cli php5.6-mysql php5.6-gd php5.6-intl php5.6-xsl php5.6-zip

This comment has been deleted

To upgrade to a newer version of PHP 5.6 on Ubuntu 14.04, you can use Ondřej Surý’s PPA. He is one of the Debian maintainers of the php5 package. To add the PPA and upgrade your packages, run:

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

Though remember to be careful when doing an upgrade of PHP outside of the normal distro repositories, some of the additional modules that you might rely on could be missing for that version. I generally recommend that you shouldn’t do such a major upgrade unless you specifically need a new feature from the newer release. Remember that Ubuntu backports security patches to their “Long Term Support” releases. So if your concern is making sure you have the most recent security fixes, simply updating your packages as normal should provide them.