PHP 7 is soon to be released, but for those of you that want to upgrade to 5.6 meanwhile, here is a quick guide.

Ubuntu Server 14.04. PHP 5.6

  1. Download the PPA
    $~: add-apt-repository ppa:ondrej/php5-5.6 && apt-get update
  2. Install the dependencies
    $~: apt-get -y install php5 php5-mhash php5-mcrypt php5-curl php5-cli php5-mysql php5-gd php5-intl php5-xsl && apt-get -f install
  3. remove unused packages
    $~: apt-get autoremove -y
  4. That’s all!


 Pro tip

If you want to upgrade PHP-APCu to 4.0.7 at the same time, just download this script and run it on your system.