How to Install PHP 8.3 in AlmaLinux 8

PHP is a script language and interpreter that is freely available and used primarily on Linux Web servers.

To add EPEL and REMI Repository.

dnf install

dnf -y install

To install yum utilities.

dnf -y install yum-utils

To enable php 8.3 Remi repository.

dnf module reset php

dnf module install php:remi-8.3


[root@vps ~]# dnf module install php:remi-8.3
Last metadata expiration check: 0:00:42 ago on Thu 07 Dec 2023 12:03:40 AM UTC.
Dependencies resolved.
 Package          Arch   Version                             Repository    Size
Installing group/module packages:
 php-cli          x86_64 8.3.0-1.el8.remi                    remi-modular 5.6 M
 php-common       x86_64 8.3.0-1.el8.remi                    remi-modular 1.3 M
 php-fpm          x86_64 8.3.0-1.el8.remi                    remi-modular 1.9 M
 php-mbstring     x86_64 8.3.0-1.el8.remi                    remi-modular 575 k
 php-xml          x86_64 8.3.0-1.el8.remi                    remi-modular 269 k
Installing dependencies:
 httpd-filesystem noarch 2.4.37-62.module_el8.9.0+3646+acd210d0
                                                             appstream     43 k
 libxslt          x86_64 1.1.32-6.el8                        baseos       248 k
 oniguruma5php    x86_64 6.9.9-1.el8.remi                    remi-safe    213 k
Installing weak dependencies:
 nginx-filesystem noarch 1:1.14.1-9.module_el8.3.0+2165+af250afe.alma
                                                             appstream     23 k
Installing module profiles:
Enabling module streams:
 httpd                   2.4
 nginx                   1.14
 php                     remi-8.3

Transaction Summary
Install  9 Packages

Total download size: 10 M
Installed size: 47 M
Is this ok [y/N]: y

To install any remaining updates.

dnf update

Install PHP 8.3

To install PHP.

dnf install php

To check PHP Version.

php -v


[root@vps ~]# php -v
PHP 8.3.0 (cli) (built: Nov 21 2023 14:40:35) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.3.0, Copyright (c) Zend Technologies

This concludes our topic of installing PHP 8.3 on AlmaLinux 8 the system.