How to install PHP 7 on Ubuntu 14 LTS server

  1. Login to your Ubuntu server with root user with your favorite SSH client

  2. Let’s first update the operating system with all the latest packages with the command

    sudo apt-get update


  1. Since PHP 7 is not available for Ubuntu Trusty in the standard Ubuntu repositories , we first need to install PPA called ondrej/php with the command.

    sudo add-apt-repository ppa:ondrej/php

  1. Press enter button to continue

  1. Now we can list the all the available PHP 7 packages with the command

    apt-cache search php7

  1. Let’s install PHP 7 with some of its required modules with the command

    sudo apt-get install php7.0 php7.0-cli php7.0-fpm php7.0-gd php7.0-json php7.0-mysql

  1. Wait for few in order to complete  the installation and in order to check if the PHP is installed correctly use the command as and you should see the output as below

    php –v

Share on Twitter
Share on Facebook

BLACK

FRIDAY

DEALS

UP TO 60% OFF
Friday November 27th starts at 9am EST.
While supplies last!