How can I install PHP 7.3 on Linux Mint 19?. In December 2018, the PHP team released PHP 7.3 for general availability (GA) and all the release details are on the PHP ChangeLog page. The default version of PHP available in Linux Mint 19 repositories is PHP 7.2.

install php 7.3 linux mint 1

This guide will walk you through the steps to install PHP 7.3 on Linux Mint 19. For Apache web server users, you’ll install libapache2-mod-php as a dependency. But for Nginx users, you’ll install PHP 7.3-FPM instead.

For other operating systems, use:

How to Install PHP 7.3 on Arch Linux and Manjaro

How to Install PHP 7.3 on Debian 9 / Debian 8

How to install PHP 7.3 on Ubuntu 18.04 / Ubuntu 16.04 / Debian

How to Install PHP 7.3 on CentOS 7 / Fedora

Step 1: Update Linux Mint 19

Ensure you’re running an updated version of Linux Mint. If you have important programs running and don’t want to upgrade them, you can just do an update for packages list.

sudo apt update
sudo apt upgrade

It is recommended to reboot after upgrade in case you have a newer version of Kernel installed.

sudo reboot

Step 2: Add PHP 7.3 repository to Linux Mint 19

Since Linux Mint 19 is a based on Ubuntu 18.04, the repository to be added is for Ubuntu 18.04.

Add ondrej/php PPA repository which has PHP 7.3 packages and other required PHP extensions.

sudo add-apt-repository ppa:ondrej/php
sudo apt update

Step 3: Install PHP 7.3 on Linux Mint 19

Once the repository has been added, install PHP by running the commands below on your terminal.

sudo apt-get install php7.3

Version can be checked using the php - command.

$ php -v
PHP (cli) (built: Jan 13 2019 10:19:33) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.1, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache, Copyright (c) 1999-2018, by Zend Technologies

Step 4: Installing PHP 7.3 Extensions

Install PHP 7.3 extensions by using the syntax

 sudo apt-get install php7.3-<entension-name>

See example below

sudo apt install php7.3-cli php7.3-json php7.3-pdo php7.3-mysql php7.3-zip php7.3-gd  php7.3-mbstring php7.3-curl php7.3-xml php7.3-bcmath php7.3-json

You can confirm installed version of PHP extension using apt policy command:

$ apt policy php7.3-gd
Version table:
*** 500
500 bionic/main amd64 Packages
100 /var/lib/dpkg/status

PHP configuration file for setting up the environment are /etc/php/7.3/cli/php.ini and /etc/php/7.3/apache2/php.ini.

Installing PHP7.3-FPM on Linux Mint

If you’re using Nginx Web Server, you’ll need to install php7.3-fpm for serving PHP pages.

sudo apt install php7.3-fpm

PHP-FPM configurations files are available under the folder/etc/php/7.3/fpm/

You may need to restart your Web server after installation of PHP.

# Apache
sudo systemctl restart apache2

# Nginx
sudo systemctl restart nginx

Have a happy PHP development and Applications hosting.

Complete Web Development Course:

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here