# How to Check for Stale PHP OPcache After a Deployment

https://ferkesh.net/knowledgebase/article/php-opcache-stale-release-diagnostic

![Workflow: Check the release path; Read runtime settings privately; Control the experiment; Retest across workers.](https://ferkesh.net/kb-media/ferkesh-guide-diagrams-batch-14.svg#php-opcache-stale-release-diagnostic)

A deployment can update files while workers still execute a previous cached version. Confirm the reported code version and the actual PHP handler before changing cache settings.

## Procedure

1. **Check the release path.** Use a sanctioned health signal or logs to compare a request’s effective build with the expected deployment. Verify the current document root and any release symlinks.
2. **Read runtime settings privately.** Use the approved panel or runtime diagnostics to inspect timestamp validation settings for the web process. Keep PHP information and private paths out of public endpoints.
3. **Control the experiment.** On staging, reproduce the old behavior and use the host’s documented cache invalidation or worker reload. Do not introduce an unauthenticated cache-clearing endpoint.
4. **Retest across workers.** Compare repeated requests and every relevant application entry point. Confirm receipt of the intended version and document how the deployment pipeline should handle the cache.

## Related guides

- [How to Compare PHP Settings for Web and CLI Runs](https://ferkesh.net/knowledgebase/article/php-web-cli-configuration-mismatch)
- [How to Diagnose Stale Content and HTTP 304 Responses](https://ferkesh.net/knowledgebase/article/diagnose-conditional-http-304)
- [Developer Resources articles](https://ferkesh.net/knowledgebase/category/developer-resources)

## Official references

- [PHP OPcache runtime configuration](https://www.php.net/manual/en/opcache.configuration.php)

Ferkesh Hosting. Last reviewed November 26, 2026.
