Introduction
I replaced a production e-commerce server running Amazon Linux 2 (PHP 8.2 / mod_php) with a new Amazon Linux 2023 instance (PHP 8.3 / php-fpm). The database is a managed service shared by both, so the only things to move were code, uploaded files, sessions, and templates edited through the admin panel.
The result: the maintenance page was up for about 6 minutes, and because I moved the login sessions too, customers who were logged in across the cutover just kept working. The thing that made it smooth was splitting the runbook into three scripts — pre / final / verify .…