How to Install PHP 8.5 on Debian 13

To install PHP 8.5 on Debian 13, Follow the steps below.

Step 1 : Update the package list and upgrade existing packages.

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

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

Step 4 : Add the SURY PHP repository to your system.

Step 5 : Update APT after adding the new repository.

Step 6 : Install PHP 8.5 and its core components.

Step 7 : Install popular PHP extensions required by most web applications.

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

Step 8 : Verify that PHP 8.5 is installed correctly.

You should see output showing PHP 8.5.x.

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