Add PHP Repository
SURY, a third-party repository which offers PHP 7.4 / 7.3 / 7.2 / 7.1 for Debian operating system.
By default, Debian 10 ships PHP v7.3. So, you can either install PHP v7.3 from Debian repository or SURY repository. Skip this section if you want to install PHP 7.3 from the Debian repository. However, if you want to install PHP 7.4 / 7.2 / 7.1 on Debian 10, you must set up SURY repository.
Update the repository cache.
sudo apt update sudo apt install -y curl wget gnupg2 ca-certificates lsb-release apt-transport-https
Import the public using the below commands.
wget https://packages.sury.org/php/apt.gpg sudo apt-key add apt.gpg
Add the SURY repository to your system.
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php7.list
Update the repository index. Continue reading “Install PHP 7.4 / 7.3 / 7.2 / 7.1 on Debian 10 / Debian 9” »