How to Install PHP 8 on Debian 10 Buster

You know that PHP 8 version is released and if you are still using the below PHP 8 version then this tutorial is for you. Cause in this tutorial, I am going to show you how to upgrade your PHP version in your Debian 10 buster. 

Just you have to follow some commands to install PHP 8 in your Debian 10 buster. I will show you step by step so that you can copy the command and run it in your terminal. Let's see how we can install PHP 8 in Debian 10 buster.

Run this below command to get started:

sudo apt-get update
sudo apt install -y lsb-release ca-certificates apt-transport-https software-properties-common gnupg2


Now time to Add the PHP packages APT repository to your Debian server.

echo "deb $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/sury-php.list"


Now import repository key:

wget -qO - | sudo apt-key add -


Now time to install PHP 8 on our machine. So run bellow command:

sudo apt-get update 
sudo apt-get install php8.0


Installation is done. Now PHP 8 version is ready to run in your system. Now below command to see the version:

php -v


Then you will see the below output:

PHP 8.0.9 (cli) (built: Jan 3 2022 13:09:45) ( NTS )
Copyright (c) The PHP Group Zend Engine v4.0.9,
Copyright (c) Zend Technologies with Zend OPcache v8.0.9,
Copyright (c), by Zend Technologies


Hope it can help you.


Facebook Github
A web enthusiastic, a self-motivated full-stack software engineer from Dhaka, Bangladesh with experience in developing applications using Laravel , React and Vue js