← BACK
Laravel / Queue

Essential Laravel Production Deployment Command Sequence

Punyapal Shah • • 1 min read
edit this tip →

Execute standard caching and optimization Artisan commands during production CI/CD deployment scripts.

Deploying Laravel applications without caching routes, views, and configuration degrades performance. Run this standard production optimization command sequence during deployment.

php artisan migrate --force
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan event:cache
php artisan queue:restart
  • migrate --force runs database migrations without interaction prompts
  • config:cache, route:cache, and view:cache pre-compile core assets
  • queue:restart signals background workers to reload updated code

Related Tips

View all tips →

// Got a tip in mind? Contributions are always welcome