The good news is this whole process is relatively painless, so here we go.

As always, all the commands assume you have root permissions.

Install the EPEL and remi repositories.

dnf install
dnf install

List the PHP versions you have available

dnf module list php

This should list versions of PHP both in the main repositorys as well as the remi repository. We want to enable remi-7.4.

Reset the php module (if you already have an existing PHP version installed)

dnf module reset php

Install PHP 7.4

dnf module enable php:remi-7.4

Update using dnf

dnf update

PHP 7.4 should now be installed.

Verify PHP version

php -v

  • linux/upgrade_php_to_7.4_in_centos_8.txt
  • Last modified: 2020/07/31 15:14
  • by vern