How To Install PHP 8.4 On Debian 13 Trixie
PHP 8.4 is the latest release offering performance improvements and new language features. This guide will show you how to install PHP 8.4 on Debian 13 (Trixie) step by step, including enabling the correct repository and installing essential PHP modules.
Step 1 : Update Your System
sudo apt update && sudo apt upgrade -yStep 2 : Install Required Dependencies
sudo apt install ca-certificates apt-transport-https software-properties-common -yStep 3 : Add The SURY PHP Repository
SURY is a popular repository providing updated PHP versions for Debian.
wget -O /etc/apt/trusted.gpg.d/sury.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ trixie main" | sudo tee /etc/apt/sources.list.d/sury-php.listStep 4 : Update Repository Index
sudo apt updateStep 5 : Install PHP 8.4
sudo apt install php8.4Step 6 : Install Common PHP 8.4 Extensions
sudo apt install php8.4-cli php8.4-fpm php8.4-mysql php8.4-xml php8.4-curl php8.4-mbstring php8.4-zip php8.4-gdStep 7 : Confirm Installation
php -vStep 8 : Restart Services (if using a web server)
For Nginx :
sudo systemctl restart nginxFor Apache :
sudo systemctl restart apache2You're Done!
PHP 8.4 is now successfully installed on your Debian 13 system. You can begin deploying applications and configuring your environment.






