Rocky Linux vs. PHP support cycle


I’m currently in the process of upgrading all my LAMP stuff (WordPress, OwnCloud, Dolibarr, etc.) from CentOS 7 to Rocky Linux 8.

How is PHP handled in Rocky Linux ? On a standard installation, dnf info php shows me that the core package is currently at version 7.2.24, which is fine by me. Is this supposed to be the same long term support as for other packages, e. g. can I continue to run PHP 7.2.xx packages on this server until the whole distribution is EOL sometime in 2029? Or is this whole thing some sort of moving target where I have to manually enable/disable module streams and where I’m supposed to upgrade PHP every year or so to 7.3 then to 7.4 then to 8.0 and so on?

How am I supposed to handle this stuff now? Any suggestions?

Hey Niki,

it’s the same as RHEL 8, so what is written on this page applies :slight_smile:

Meaning, 7.4 has support until 2029, 7.2 already ended support, 7.3 also already ended support, 8.0 has support until next November (and maybe there will be one or two more short lifetime application streams)

Btw in case you are using Nextcloud, you will definitely be using Remi’s RPM repo, where other rules apply, they are providing support for the latest PHP version(s, ?)

Hope this helps you :slight_smile:

1 Like

Oh also btw, upgrading from application stream to another works pretty well, have been doing this in the past several times for nginx and PHP, that’s basically done by dnf module switch-to php:8.0 (i.e. if you want to get to 8.0). Never tried downgrades though, don’t think this works. Of course it’s needed to look for breaking changes in the config then.

1 Like

I can say that a downgrade of PHP works if you totally remove all of the currently installed PHP version first, then enable the repository (or module) that you want to handle PHP. I’ve only had to do this when something didn’t line up with the installed version of PHP (requirement of an application not met), but it does work.


Thanks very much for that detailed information. The RHEL documentation link was especially helpful. Looks like I’ll go with PHP 7.4 which is supported until Rocky 8 is officially EOL.

If I understand this correctly, here’s what I have to do to install PHP 7.4 on a pristine Rocky Linux 8 (correct me if I’m wrong):

# dnf module list php
Name             Stream              Profiles                               
php              7.2 [d]             common [d], devel, minimal   
php              7.3                 common [d], devel, minimal      
php              7.4                 common [d], devel, minimal    
php              8.0                 common [d], devel, minimal  
# dnf module reset php
# dnf module enable php:7.4
# dnf module install php:7.4/common
# php -v
PHP 7.4.30 (cli) (built: Jun  7 2022 08:38:19) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies



1 Like

I’ve done a downgrade with “reset, enable, distro-synch”. For nvidia-driver stream on el9.