Deploying Laravel Apps with Zero Downtime

S
Samuel Kimani
January 16, 2026 1 min read

Why Zero Downtime Matters

Every second of downtime during deployment costs trust. Users see errors, webhooks fail, queued jobs stall. For payment-processing apps — which most of our Kenyan clients run — even 30 seconds of downtime can mean lost transactions.

The Symlink Strategy

Our deployment pipeline uses the symlink approach: each deployment creates a new release directory, installs dependencies, runs migrations, and builds assets. Only when everything succeeds does the symlink switch to the new release. If anything fails, the old release keeps serving.

Health Checks and Rollbacks

After the symlink switches, we run automated health checks: HTTP response codes, database connectivity, queue processing, and M-Pesa callback reachability. If any check fails within 60 seconds, we automatically roll back to the previous release.We keep the last 5 releases on disk for instant rollback capability. Older releases are pruned automatically. Combined with database migration rollback scripts, we can recover from any deployment failure in under 10 seconds.

Queue Worker Restarts

The trickiest part is queue workers. They hold references to old code in memory. We use php artisan queue:restart to gracefully terminate workers after they finish their current job, then supervisord brings up new workers running the updated code.

Need software built?

Tell us what you need. We respond within 24 hours with a realistic quote.