Upgrading to PHP 7.4 on Centos 8

You can use the default AppStream to upgrade PHP instead of using external repositories now.

# dnf module list php

To enable PHP version 7.4, simply use the command:

# dnf module enable php:7.4

You may encounter error of not possible to switch stream with an error like below:

If that is the case, then use the following command to reset:

# dnf module reset php

After the module is enabled to ver 7.4, you will need to switch to 7.4:

# dnf module switch-to php:7.4

After that, PHP is upgraded to ver 7.4

Leave a Comment