How to Install PHP 7.3 on CentOS 7

Install PHP 7.3 on CentOS 7

In this article, we will have explained the necessary steps to install and configure PHP 7.3 on CentOS 7. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

PHP: Hypertext Preprocessor (or simply PHP) is a server-side scripting language designed for Web development, but also used as a general-purpose programming language. The standard PHP interpreter, powered by the Zend Engine, is free software released under the PHP License. PHP has been widely ported and can be deployed on most web servers on almost every operating system and platform, free of charge. PHP 7.3 is the latest stable version of PHP.

Install PHP 7.3 on CentOS

Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.

Step 2. Install PHP.

First, Add PHP 7.3 Remi repository:

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

Install PHP 7.3 and some of the most common PHP modules:

Verify the PHP installation, by typing the following command which will print the PHP version:

If you are using Apache as your web server then just restart the Apache service using the following command and you are good to go:

Congratulation, you have learned how to install and configure PHP on CentOS 7. If you have any question, please leave a comment below.