How to Install PHP 7.4 on AlmaLinux 8?

Install PHP 7.4 on AlmaLinux 8 using this step by step guide.

Install EPEL Repository

Install EPEL repository using the following command.

sudo dnf -y install epel-release

Install Remi Repository

Install Remi repository using the following command.

sudo dnf -y install http://rpms.remirepo.net/enterprise/remi-release-8.rpm

Enable PHP 7.4 using the following command.

sudo dnf module enable php:remi-7.4

Congratulations, you have successfully installed PHP 7.4 on AlmaLinux 8.