PHP 8 is the latest version of the popular server-side scripting language. In this guide, we will walk you through the steps to install PHP 8 on Debian 11.
Step 1: Update Your System
First, ensure that your system is up to date. Open your terminal and run the following command:
sudo apt update && sudo apt upgrade -y
Step 2: Add PHP Repository
PHP 8 is available in the Sury repository. Add the repository by running:
sudo apt install -y lsb-release apt-transport-https
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
curl -fsSL https://packages.sury.org/php/apt.gpg | sudo apt-key add -
Step 3: Install PHP 8
Now, update the package list again and install PHP 8:
sudo apt update
sudo apt install php8.0
Step 4: Verify the Installation
To verify that PHP 8 has been installed successfully, run:
php -v
You should see output showing the installed PHP version.
Step 5: Install Additional PHP Extensions (Optional)
You may want to install additional PHP extensions for your applications. Here’s how to install common extensions:
sudo apt install php8.0-cli php8.0-fpm php8.0-mysql php8.0-xml php8.0-mbstring php8.0-curl
Conclusion
You have successfully installed PHP 8 on Debian 11. This powerful scripting language will help you build dynamic web applications.
If you're looking for a reliable hosting solution for your PHP applications, consider using Windows VPS UK. With Windows VPS, you can efficiently host your applications and ensure high performance. Whether you need VPS UK Windows or Windows Virtual Private Servers, you'll find a solution that fits your requirements.
For larger deployments or enterprise needs, explore Windows Virtual Dedicated Server Hosting or Virtual Private Server Hosting Windows. Whether you're located in the UK, Italy, or elsewhere, Windows VPS Italy and UK VPS Windows offer reliable hosting options. Visit Windows VPS Hosting UK to discover the best hosting solutions for your needs.