A PHP runtime upgrade can improve security, performance and language capabilities, but syntax compatibility is only one part of the work. Applications also depend on extensions, Composer packages, PHP-FPM configuration and hosting behavior.
Inventory the runtime
Record the current PHP version, extensions, INI settings, SAPI and Composer platform requirements. Identify code paths that rely on deprecated behavior, dynamic properties, changed function signatures or extension-specific behavior.
Check dependencies
Review Composer constraints and package release notes. Run Composer platform checks under the target runtime and update dependencies in a controlled branch. Do not assume that a package supporting the PHP language version also supports the exact extension versions available on the server.
Test representative workflows
Run unit and integration tests and manually verify critical features such as uploads, email, PDF generation, scheduled jobs and database access. Test the actual PHP-FPM SAPI used by the website, not only the CLI binary.
Roll out with recovery
Deploy to staging first, compare logs and performance, then roll out to production with a rollback plan. Keep configuration changes separate where possible so runtime and application regressions are easier to isolate.
Checklist
- Inventory PHP, extensions, SAPI and INI settings.
- Verify Composer dependency compatibility.
- Test CLI and web PHP runtimes separately.
- Exercise critical application workflows.
- Roll out gradually and monitor errors.