In this article, you will learn how to install the latest PHP version 8 on Ubuntu 20.04 LTS, Debian 10, and their derivative distributions.
PHP is one of the most popular server-side scripting languages. Most of the websites on the internet are using PHP including Facebook, Yahoo, Wikipedia. Moreover, there are many frameworks that are built with PHP. E.g, WordPress, Codeigniter, Laravel, etc.
This article will guide on how to install the latest stable release of PHP 8.0 on Ubuntu, Debian, and their derivatives like Mint, MX Linux, Elementary OS, POP OS, Zorin OS, etc.
Installing PHP 8 on Ubuntu / Debian
As PHP 8 is recently released so it is not available in the default repositories of various distributions.
However, there is a popular repository that a Debian developer maintains which we can use to install PHP 8.
First make sure you have add-apt-repository command utility in your system.
sudo apt-get install software-properties-common
Now you can add the repository and update the packages cache in the system.
sudo add-apt-repository ppa:ondrej/php sudo apt-get update
Finally, to install PHP 8 in your Linux system, use the installation command.
sudo apt install php8.0
This will install the PHP 8 in your Linux distribution. To verify the installed version, use the php command.
Watch Video guide on YouTube
Additionally, You can also watch a step-by-step video guide on YouTube to get a better understanding of it.
So that’s it on how to install PHP 8 on Ubuntu, Debian. Do subscribe to the LinuxH2O Youtube channel. Till then take care and keep enjoying Linux.