Zero-Downtime Deployments on aaPanel VPS: Caches, Permissions & Rollbacks
A field-tested checklist for shipping Laravel releases to production VPS servers without 500 errors or downtime.
Most production incidents after a deployment are not code bugs — they are environment mistakes: stale caches, wrong file ownership, or missing rollback paths. Here is the checklist we use at Hyper Innovation for every release.
1. Ownership Before Everything
PHP-FPM runs as the www user. Any CLI command executed as root can create log or cache files that PHP-FPM can no longer write, producing instant HTTP 500 errors. Always re-apply chown -R www:www storage bootstrap/cache with SGID directories after maintenance tasks.
2. Rebuild Only the Caches You Use
Clear and rebuild configuration, route, event, and view caches in one atomic step so the application never boots with a half-updated cache state.
3. Snapshot, Deploy, Verify, Roll Back
Archive the files you are about to replace, deploy, then run automated HTTP checks against every critical route. If any check fails, restore the snapshot in seconds.
Leave a comment
Your email address will not be published. Required fields are marked *