How to Install PHP 8.3 in RHEL 9?

How to Install PHP 8.3 in RHEL 9?

Keeping up with the latest versions of programming languages is crucial for developers to leverage new features, enhance security, and improve performance. PHP 8.3 brings significant improvements over its predecessors, and installing it on Red Hat Enterprise Linux (RHEL) 9 can be vital for developers working on web applications. In this guide, we'll walk you through the process of installing PHP 8.3 on RHEL 9.


Before proceeding, ensure you have the following:

  • Access to a terminal with sudo privileges
  • RHEL 9 installed and updated
  • Basic knowledge of Linux commands

Step 1: Add Remi Repository

To install PHP 8.3 on RHEL 9, we'll use the Remi repository, which provides up-to-date PHP packages. Follow these commands to add the Remi repository:

sudo dnf install -y
sudo dnf module reset php

 Step 2: Enable PHP 8.3 Module

Once the Remi repository is added, enable the PHP 8.3 module:

sudo dnf module enable php:remi-8.3

 Step 3: Install PHP 8.3

With the repository and module enabled, install PHP 8.3 along with necessary extensions:

sudo dnf install -y php

 Step 4: Verify Installation

After installation, verify that PHP 8.3 is installed correctly by checking its version:

php -v

 You should see output similar to this:

PHP 8.3.0 (cli) (built: )

Step 5: Configure PHP

Depending on your application requirements, you may need to configure PHP settings. The PHP configuration files are typically located in /etc/php.ini or /etc/php.d/. Edit these files as needed, for example, to adjust memory limits, enable extensions, or modify error reporting settings.

Step 6: Restart Web Server (if applicable)

If you're using PHP with a web server like Apache or Nginx, restart the web server to apply the changes:

For Apache:

sudo systemctl restart httpd

 For Nginx:

sudo systemctl restart nginx


By following these steps, you can easily install PHP 8.3 on RHEL 9, enabling you to take advantage of its new features and improvements. Keeping your development environment up-to-date ensures better compatibility, performance, and security for your web applications. Remember to always test your applications thoroughly after upgrading PHP to ensure compatibility with the new version.


  • The list of comments is empty