Install PHP 7.4 on Debian 10/Debian 9


In this guide, we are going to learn how to install PHP 7.4 on Debian 10/Debian 9. PHP 7.4 is a minor release of PHP 7 that that comes with a lot of changes meant to boost performance and improve code readability or maintainability.

The official release of PHP 7.4 is scheduled to happen on November 28, 2019.

To see a complete list of new features and what has been deprecated on PHP 7.4, review the PHP 7.4 changelog.

Install PHP 7.4 on Debian 10/Debian 9

Add SURY PHP Repository

PHP 7.4 is not available on the default Debian 10 APT repositories. As such you need to install the SURY PHP repository.

With SURY repos, you can install PHP 7.4 beta release for testing purposes.

Install the SURY Repository Signing Key

apt install gnupg2 -y
wget -qO - | sudo apt-key add -

Install the SURY Repository

echo "deb $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php7.x.list

Update and upgrade your system packages

apt update
apt upgrade

Check the PHP 7.4 is available for installation.

apt-cache policy php7.4

Debian 10

  Installed: (none)
  Candidate: 7.4.0~beta4-1+0~20190827.2+debian10~1.gbpd41595
  Version table:
     7.4.0~beta4-1+0~20190827.2+debian10~1.gbpd41595 500
        500 buster/main amd64 Packages

Debian 9

  Installed: (none)
  Candidate: 7.4.0~beta4-1+0~20190827.2+debian9~1.gbpd41595
  Version table:
     7.4.0~beta4-1+0~20190827.2+debian9~1.gbpd41595 500
        500 stretch/main amd64 Packages

Install PHP 7.4

You can now install PHP 7.4 now that you have the repos in place.

apt install php7.4

Verify the version of installed PHP 7.4

php -v
PHP 7.4.0beta4 (cli) (built: Aug 27 2019 13:24:38) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0-dev, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.0beta4, Copyright (c), by Zend Technologies

Install PHP 7.4 Extensions

To install extra PHP 7.4 modules, you can simply run the command;

apt install php7.4-extension

Where the extension is the PHP 7.4 module you want to install.

For example, to install MySQL module for PHP 7.4, simply execute the command;

apt install php7.4-mysql

Well, that is all on how to install PHP 7.4 beta release on Debian 10/9. Enjoy

Related Tutorials

How to Install PHP 7.3.3 on Ubuntu 18.04

Install PHP 7.3.4 on Fedora 30

Installing PHP 7.3.3 on CentOS 7.6


We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!

Photo of author
I am the Co-founder of, Linux and the whole FOSS enthusiast, Linux System Admin and a Blue Teamer who loves to share technological tips and hacks with others as a way of sharing knowledge as: "In vain have you acquired knowledge if you have not imparted it to others".

Leave a Comment