Installing PHP 8.4 on Rocky Linux 10 via Remi Repository

PHP 8.4 is a development/pre-release version of PHP introducing new features and performance improvements. This guide explains how to install PHP 8.4 on Rocky Linux 10 using the Remi repository, which provides updated PHP versions for RHEL-based systems.

PHP 8.4 is under active development (alpha/beta as of May 2025). It is not recommended for production use.

Prerequisites

Ensure your system is up to date and has necessary utilities installed.

Update System

dnf update -y

Install Required Utilities

dnf install -y dnf-utils epel-release

Enable Remi Repository

Install and enable the Remi repository to access newer PHP versions.

Install Remi Repository RPM

dnf install -y https://rpms.remirepo.net/enterprise/remi-release-10.rpm

Enable PHP 8.4 Module

Reset the default PHP module and enable PHP 8.4 from Remi:

dnf module reset php -y
dnf module enable php:remi-8.4 -y

Install PHP 8.4 and Common Extensions

Install PHP 8.4 with frequently used extensions:

dnf install -y php php-cli php-common php-mysqlnd php-pdo php-gd php-mbstring php-xml php-bcmath php-curl php-intl php-soap php-zip php-readline

You can install more or fewer extensions depending on your requirements.

Verify PHP Installation

Check the installed PHP version:

php -v

Example output:

PHP 8.4.8 (cli) (built: Jun  3 2025 16:29:26) (NTS gcc x86_64)
Copyright (c) The PHP Group
Built by Remi's RPM repository <https://rpms.remirepo.net/> #StandWithUkraine
Zend Engine v4.4.8, Copyright (c) 

Conclusion

You’ve now successfully installed PHP 8.4 on Rocky Linux 10 using the Remi repository. This setup is great for testing the latest PHP features in a development environment.


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS