Update PHP 8.2 on CentOS-Based Linux (NGINX + PHP-FPM)
Update PHP 8.2 on CentOS-Based Linux (NGINX + PHP-FPM)
To update PHP 8.2 to the latest available patch version on AlmaLinux, Rocky Linux, RHEL, or CentOS-based systems, follow these steps.
1. Check Current PHP Version
php -v2. Update PHP 8.2 Packages
sudo dnf update 'php82*' -y3. Restart PHP-FPM
sudo systemctl restart php82-php-fpm4. Validate and Reload NGINX
sudo nginx -t && sudo systemctl reload nginx5. Verify Updated PHP Version
/opt/remi/php82/root/usr/bin/php -v6. Check PHP-FPM Status
sudo systemctl status php82-php-fpmImportant: These commands assume PHP 8.2 is installed using version-specific packages such as Remi's php82-*. The update installs the latest available PHP 8.2 security patches and bug fixes without upgrading to PHP 8.3 or PHP 8.4.
Recommendation: Perform the update during a maintenance window on production servers to minimize downtime.