How to move a PHP site from 8.1 to 8.3 without downtime (php-fpm, pools and testing)
PHP 8.1 and older no longer get security fixes. Moving a site to a current version is mostly safe, but plugins and old code can use removed features, so test each site before you switch.
See what each site runs and which extensions it uses
Install the same extensions on the new version.
php -v php -m | sort > ~/php-modules-old.txt php -m | wc -lInstall the new version next to the old one
Both run side by side, so each site can move on its own. On Ubuntu, versions the release does not ship come from the ondrej/php repository.
sudo apt-get install -y php8.3-fpm php8.3-cli php8.3-mysql php8.3-xml php8.3-mbstring php8.3-curl php8.3-zip php8.3-gd php8.3-intl php8.3 -m | sort > ~/php-modules-new.txt diff ~/php-modules-old.txt ~/php-modules-new.txtCheck the code for incompatibilities
Syntax errors show immediately; deprecated features show in the logs.
find /path/to/site -name '*.php' -not -path '*/vendor/*' -print0 | xargs -0 -n1 -P4 php8.3 -l | grep -v '^No syntax errors'Switch one site and test
In your web server or panel, point that site to the php8.3 pool. On CloudPanel, change the PHP version in the site settings. Test the main pages and forms.
Watch the logs for a few days
Warnings about deprecated functions mean a plugin needs an update.
sudo tail -f /var/log/php8.3-fpm.log sudo tail -f /var/log/nginx/error.logDisable the old version when no site uses it
Check usage again before disabling (see the guide on disabling an old PHP version).
sudo grep -rEn 'php8\.1' /etc/nginx 2>/dev/null sudo systemctl disable --now php8.1-fpm
Common mistakes
- Forgetting a PHP extension: the site shows a blank page.
- Changing the php command default and breaking cron jobs.
- Moving every site on the same day.
How to undo it
Point the site back to the old pool; it is still installed and running until you disable it.
Sources
Commands are for Debian and Ubuntu unless noted. Test on a copy first and keep a backup: you are responsible for changes on your own systems.