PHP 7.3 is the latest stable release available for the installation. This tutorial will help you with the installation of PHP latest version on your Debian system. Now follow this tutorial to Install PHP on Debian 10, Buster.
Debian 10 is still under development. So this tutorial is tested with Debian 10 daily build version.
Login to your Debian 10 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.
sudo apt update sudo apt upgrade
Setup PPA on Debian 10
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.
sudo apt install ca-certificates apt-transport-https wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add - sudo echo "deb https://packages.sury.org/php/ buster main" | tee /etc/apt/sources.list.d/php.list
You Debian 10 system is ready for the PHP installation.
Install PHP on Debian 10
You can also install the Latest PHP version on your system. Run the following commands to install PHP 7.3 on Debian 10.
sudo apt update sudo apt install php7.3
Also install required php modules.
sudo apt install php7.3-cli php7.3-common php7.3-curl php7.3-gd php7.3-json php7.3-mbstring php7.3-mysql php7.3-xml
After installation verify the installed and active PHP version using the following command
php -v PHP 7.3.1-1 (cli) (built: Jan 13 2019 10:13:20) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.1, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.3.1-1, Copyright (c) 1999-2018, by Zend Technologies
Congratulation! Enjoy the development with PHP on Debian 10 Buster system.