Operations
How to stage and verify a PHP security update
Inventory the PHP runtimes serving production, confirm the vendor's fixed build, test the update in a representative staging environment, deploy it to each production runtime, restart or replace the serving workers, and check application health. Keep the exact package or image evidence with the change record.
Build an accurate runtime inventory
List production domains, PHP versions and vendors, serving SAPIs, FPM pools, containers, and any separate background workers that execute PHP. A single server can host multiple runtimes, while a container deployment may run a different build from the host CLI. Include staging and disaster-recovery environments in the inventory so they do not become forgotten copies.
For PHP2Shell, use PHP's fixed release list for upstream installations or the operating-system/provider advisory for backported packages. Confirm that the package or image you plan to deploy is the one mapped to each web service.
Test the change against real application paths
Use a staging environment that resembles production in PHP branch, extensions, configuration, and deployment method. Exercise a focused set of high-value paths: home page, authentication, forms, file uploads, scheduled tasks, API endpoints, and checkout if present. Review application and PHP logs for startup errors or deprecations introduced by the update.
A staging pass reduces deployment surprises; it does not itself prove production is patched. Keep the update moving according to the risk and support guidance rather than leaving an internet-facing runtime on a vulnerable build while waiting indefinitely for an ideal test environment.
Capture both the package or image revision and the application test results. If one check fails, note whether it is a runtime startup issue, a missing extension, a site regression or an unavailable third-party dependency; that helps the right owner fix it without rolling back blindly.
Deploy, restart, and verify
Apply the provider package or deploy the reviewed container image to every serving pool and instance. Restart or roll out PHP workers using the platform's runbook, then verify the running package/image identifier and worker health. Check public application behavior and monitor logs and service metrics for regressions.
Record the change timestamp, runtime evidence, services restarted, test results, and any rollback decision. If a vendor backport uses an older version string, retain its advisory identifier. Do not infer patch success from a version banner alone.
Common questions
What belongs in a smoke test?
Choose the site's real workflows, such as login, uploads, checkout, scheduled work and queues, and inspect errors after the change.
Does staging prove production is healthy?
No. Production can differ in traffic, configuration, extensions, replicas or data; verify deployment and monitor the live change.
Can rollback reintroduce the vulnerability?
Yes. Use agreed recovery criteria and treat a return to an unpatched runtime as a time-bound risk decision.