MOX
Products
Learn about our additional services
Resources & Elements
Return

MOXNicolás Aravena
15-09-2021

How to update / upgrade to PHP 7.3 on Debian 9?

This short tutorial is used to install PHP 7.3 on Debian 9 and Debian 8. PHP 7.3 fixes several bugs, adds new features, and fixes obsolete issues in your dependencies.

Update your Debian VPS


First of all, you must have your system updated.


sudo apt update
sudo apt upgrade -y


Repository


Add the PHP 7.3 repository



sudo apt -y install lsb-release apt-transport-https ca-certificates
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list


Update your system again


The final step to installing PHP 7.3 on Debian 9 and Debian 8 is to update your system again, but with the dependencies added:

sudo apt update


Check your system's current version




php -v

PHP 7.3.29-1+0~20210701.86+debian9~1.gbp7ad6eb (cli) (built: Jul 1 2021 16:11:36) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.29, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.3.29-1+0~20210701.86+debian9~1.gbp7ad6eb, Copyright (c) 1999-2018, by Zend Technologies


(Optional) Add libraries or extensions.



Find the libraries you need and install them just like in other versions of PHP.

 sudo apt install php7.3-



Other articles that might interest you

Servicios

Fast, secure web hosting designed to grow with you.

Your sites load faster, are always available, and have expert support 24/7. SSL certificates, automatic backups, and an intuitive dashboard are included. Ideal for shops, blogs, or businesses that can't stop.

Get to know Hosting

Browse without limits with a fast, private VPN.

Protect your identity with military-grade encryption, bypass geoblocks, and access all the world's content. No logs, optional dedicated IP, and stable connections across all your devices.

More about Chilean VPN

Total power and control with dedicated VPS servers.

Get root access, high performance with NVMe drives, and complete isolation. Easily scale your resources to host applications, systems, or web projects with constant traffic. Advanced security and dedicated support whenever you need it.

Get to know Cloud VPS