0

I am using Ubuntu and I'm quite new to this OS. How can I install PHP 5.6.8?

Zanna
  • 70,465
user2702406
  • 9
  • 1
  • 2

1 Answers1

3

You can use a ppa to install a newer version of PHP and keep it up to date.

Add the ppa to you system with:

sudo add-apt-repository ppa:ondrej/php5-5.6
sudo apt-get update

Install the relevant packages on your system with:

sudo apt-get install python-software-properties
sudo apt-get install php5

Once it is finished check the version with php5 -v

flickerfly
  • 7,279
Pabi
  • 7,401
  • 3
  • 40
  • 49
  • The PPA listed here doesn't exist. I believe you want sudo add-apt-repository ppa:ondrej/php and then sudo apt-get install php5.6. – flickerfly Dec 28 '16 at 15:47