How to install or upgrade to PHP 8.3 on AlmaLinux 9
PHP 8.3, released in 2023, represents a major update to PHP with a range of new features. These include typed class constants, improved Exceptions in the DateTime extension, and the introduction of the json_validate function, alongside functional changes, improvements, and deprecations. As with previous major versions, PHP 8.3 also incorporates bug fixes and performance enhancements to further refine its capabilities.
To Install Or Upgrade To PHP 8.3 On AlmaLinux 9
Step 1: Add EPEL and REMI Repository by using the below command.
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Step 2: Install yum utilities by using the below command.
dnf -y install https://rpms.remirepo.net/enterprise/remi-release-9.2.rpm
Step 3: List the available versions of PHP by using the below command
dnf module list php -y
Step 4: Reset the PHP module
dnf module reset php
Step 5: Now install PHP 8.3 from the remi-8.3 module by using the below command.
dnf module install php:remi-8.3
Step 6: Then update again by using the below command.
dnf update -y
Step 7: Verify the installed PHP version by using the below command
php -v
Conclusion
In this guide, we have walked you through the steps required to install or upgrade to PHP 8.3 on AlmaLinux 9. Good luck!