How To Install PHP 7.3 on CentOS 7 / Fedora

Step 1: Add PHP 7.3 Remi repository

PHP 7.3 is available for CentOS 7 and Fedora distributions from the Remi repository. Add it to your system by running

sudo yum -y install 
sudo yum -y install epel-release yum-utils

Step 2: Disable repo for PHP 5.4

By default, the enabled repository is for PHP 5.4. Disable this repo and enable on for PHP 7.3

sudo yum-config-manager --disable remi-php54
sudo yum-config-manager --enable remi-php73

Step 3: Install PHP 7.3 on CentOS 7 / Fedora

Once the repo has been enabled, install php 7.3 on CentOS 7 or Fedora using the command

p-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json
$ php -v
 PHP 7.3.1 (cli) (built: Jan  8 2019 13:55:51) ( NTS )
 Copyright (c) 1997-2018 The PHP Group
 Zend Engine v3.3.1, Copyright (c) 1998-2018 Zend Technologies

Step 4: Installing other PHP 7.3 Extensions

Install PHP 7.3 extensions by using the syntax

sudo yum install php-<entension-name>

As an example, to install a mysql module for PHP applications that use MySQL databases, you’ll run:

sudo yum install php-mysql

This will only work if the default repository for PHP packages is 7.3

sudo yum install php-mysqlnd


# rpm -qi php-mysqlnd
 Name        : php-mysqlnd
 Version     : 7.3.1
 Release     : 1.el7.remi
 Architecture: x86_64
 Install Date: Thu 10 Jan 2019 06:56:47 PM UTC
 Group       : Development/Languages
 Size        : 856852
 License     : PHP
 Signature   : DSA/SHA1, Tue 08 Jan 2019 06:44:21 PM UTC, Key ID 004e6f4700f97f56
 Source RPM  : php-7.3.1-1.el7.remi.src.rpm
 Build Date  : Tue 08 Jan 2019 06:24:34 PM UTC
 Build Host  :
 Relocations : (not relocatable)
 Packager    :
 Vendor      : Remi Collet
 URL         :
 Bug URL     :
 Summary     : A module for PHP applications that use MySQL databases
 Description :
 The php-mysqlnd package contains a dynamic shared object that will add
 MySQL database support to PHP. MySQL is an object-relational database
 management system. PHP is an HTML-embeddable scripting language. If
 you need MySQL support for PHP applications, you will need to install
 this package and the php package.
 This package use the MySQL Native Driver

Enjoy using PHP 7.3 and feel free to report any bugs you encounter to the development team.