How to upgrade from PHP 7.0 or PHP 7.2 to PHP 7.3 in Debian

How To,

Last Updated

The process, more or less are the same with the previous upgrade from PHP 7.0 to PHP 7.3, but in this article, I will describe in 4 simple steps.

Install Package

Run these commands on your terminal to add a supported PHP version to the repository.

# sudo apt install apt-transport-https lsb-release ca-certificates
# sudo wget -O /etc/apt/trusted.gpg.d/php.gpg
# sudo sh -c 'echo "deb $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
#sudo apt-get update

Install PHP 7.3

Run this command to start installing PHP 7.3

#sudo apt-get install php7.3-fpm

Install PHP-MySQL

Run this command to install PHP-MySQL

sudo apt-get install php7.3-mysql

Configure NGINX Server Block

Open domain’s server block

sudo vi /etc/nginx/site-available/


fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;


fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;

Reload Nginx to start using PHP 7.3

That’s it!

Any idea? Fill the comment below

This site uses Akismet to reduce spam. Learn how your comment data is processed.