Installing PHP 7 on Ubuntu 14.04¶
Installation¶
By default, Ubuntu 14.04 ships with PHP 5.5.9 as the latest available version. If you would like to install PHP 7.x then you will need to do so using additional software repositories. For this guide we will be using an excellent 3rd party PPA.
First you need to ensure you have the software-properties-common
package installed:
apt-get install software-properties-common
Then you can add the repository in:
add-apt-repository ppa:ondrej/php
apt-get update
Now you can install PHP 7:
apt-get install php7.1 php7.1-common php7.1-mysqli php7.1-dev php7.1-mcrypt
Configuration¶
Configuration files are located in specific directories for the version you installed. In the example above, 7.1
this would be:
/etc/php/7.1/