Upgrade the system-wide PHP version using the distribution’s module system.
This approach ensures:
PHP follows a defined support lifecycle:
| Version | Status | Security Support Until |
|---|---|---|
| 8.2 | Security only | 31 Dec 2026 |
| 8.3 | Supported | 31 Dec 2027 |
| 8.4 | Supported | 31 Dec 2028 |
| 8.5 | Supported | 31 Dec 2029 |
👉 Once a version reaches EOL:
php -v
dnf module list php
Typical output includes:
[e] (enabled)PHP upgrades must be performed via the module system, not via dnf upgrade.
Reason:
dnf module reset php -y
This removes the currently active PHP stream.
Example: switch to PHP 8.3
dnf module enable php:8.3 -y
This defines the target version for all PHP packages.
dnf distro-sync -y
This step is critical:
php-* packagesTypical effects:
systemctl restart php-fpm
systemctl restart nginx # or httpd
php -v
systemctl status php-fpm
During upgrade, .rpmnew files may appear:
/etc/php.ini.rpmnew/etc/php.d/*.rpmnew👉 These must be reviewed and merged if needed.
PHP extensions are upgraded automatically, but:
Check loaded modules:
php -m
New dependencies may be installed during upgrade.
👉 This is expected and part of the dependency resolution.
dnf distro-sync --assumeno
dnf module reset php -y
dnf module enable php:8.3 -y
dnf distro-sync -y
systemctl restart php-fpm
systemctl restart nginx
Using the module system for PHP upgrades guarantees:
This is the recommended and reliable method for PHP upgrades on enterprise Linux systems.