Login/Register

How to: Install PHP 7 on Ubuntu 16.04

created by BasicSysAdmin

Tags: Linux, Ubuntu, Ubuntu 16.04, PHP

May 31, 2016

Introduction

In this guide, I will show you how to install php7 on your Ubuntu 16.04 installation
Prerequisites

In order to follow this tutorial, you will need the following

  • Ubuntu 16.04

  • Sudo privileges (or root access)


  • Update Package list

    Before installing any new packages, it is always good idea to update your package list. You can do this by typing:
    sudo apt-get update

    Installing PHP7

    Next, you can install PHP 7 this command:
    sudo apt-get install php7.0


    After you have done this, PHP 7 should be installed. You can check the version using this command:
    php -v