How to Install PHP 8.4 on Debian 13

To install PHP 8.4 on Debian 13, follow the steps below.

Step 1 : Update the package list and upgrade existing packages to ensure your system is up to date.

Step 2 : Install the necessary packages required to securely add external repositories.

Step 3 : Add the official GPG key to verify packages from the SURY PHP repository.

Step 4 : Add the SURY repository to your system.

Step 5 : Update APT after adding the new repository.

Step 6 : Install PHP 8.4 and its core components.

Step 7 : Install Commonly Used PHP Extensions

Install commonly used PHP extensions for web applications.

  • mysql: Enables PHP to connect to MySQL/MariaDB databases
  • curl: Allows PHP to send HTTP requests to APIs and external services
  • xsl: Transforms XML documents using XSLT
  • gd: Provides image manipulation features such as resize and crop
  • common: Contains common files required by PHP
  • xml: Enables XML parsing and handling
  • zip: Allows creating and extracting ZIP archives
  • soap: Supports SOAP-based web services
  • bcmath: Provides arbitrary precision mathematics functions
  • mbstring: Handles multibyte character encoding (UTF-8)
  • gettext: Enables localization and translation support
  • imagick: Advanced image processing using ImageMagick

Step 8 : Verify that PHP 8.4 is installed correctly.

You should see output showing PHP 8.4.x.

Congratulations! You have successfully installed PHP 8.4 on Debian 13.