Prerequisites

Login to your Debian 8 system using shell access. For remote systems connect with SSH. Windows users can use Putty or other alternatives applications for SSH connection. Run below commands to upgrade the current packages to the latest version.

Enable PHP PPA on Debian 8

Let’s execute the following commands to install the required packages first on your system. Then import packages signing key. After that configure PPA for the PHP packages on your system. You Debian 8 system is prepared for the PHP installation. Install the required PHP on Debian 8 system using the following options.

Installing PHP 7.2

You can also install the Latest PHP version on your system. Run the following commands to install PHP 7.2 on Debian 8. Also install required php modules.

Installing PHP 7.1

If your application has the specific requirement of PHP 7.1, You can use the following commands for installing PHP 7.1 on Debian 8 Jessie. Also, install the required PHP modules.

Installing PHP 5.6

For the older PHP application depends on PHP 5. Execute the following commands for installing PHP 5.6 on your Debian 8 Jessie. Also install required php modules. Congratulation! Enjoy the development with PHP 7.2, PHP 7.1 or PHP 5.6 on Debian 8 Jessie system.