Article Programming

Deploying Laravel 13 to production: cache, queue workers and reloads

A Laravel deployment is more than git pull and composer install. Treat production caches, long-running workers, APP_DEBUG and service reloads as part of every release.

Hamid Aarab Senior WordPress and WooCommerce Backend Developer
Published
Reading time
2 min read

Hamid Aarab November 22, 2026 2 min read

Terminal-style Laravel 13 cover with deployment and queue-worker commands
Contents (7)

Laravel 13 requires PHP 8.3 or newer, and a healthy deployment is more than copying new files. The important work continues after the release reaches the server: production caches must match the new code and long-running processes must load that code too.

1. APP_DEBUG must be false in production

It sounds basic, but debug mode remains one of the highest-impact deployment mistakes. Exception output can expose paths and configuration details. Keep production configuration separate from developer-local settings.

2. Make optimize part of the release

Laravel provides php artisan optimize for production caching. You can also execute the underlying config, event, route and view cache commands individually when your pipeline needs finer control.

php artisan optimize
# or granularly:
php artisan config:cache
php artisan event:cache
php artisan route:cache
php artisan view:cache

After config:cache, direct env() calls outside configuration files are the wrong pattern. Read values through Laravel configuration instead.

3. Queue workers do not notice new code automatically

queue:work is a long-running process that keeps the booted application state in memory. Deploying files does not reload that process. Without a restart/reload, web requests can execute the new release while queued jobs continue executing the previous one.

4. Laravel 13 provides a unified reload command

Laravel 13 documents php artisan reload for reloading long-running services such as queue workers, Reverb and Octane. Outside Laravel Cloud, keep a process monitor configured so terminated workers are started again.

php artisan reload

5. Release order matters

  1. Prepare the new release in a separate directory.
  2. Run Composer with production-appropriate flags.
  3. Build production configuration and caches.
  4. Run backward-compatible migrations.
  5. Atomically switch the current-release symlink.
  6. Reload long-running services.
  7. Run health checks and inspect logs.

Why atomic releases?

Overwriting files in the live directory allows a request to observe a mixture of old and new code during deployment. Release directories plus an atomic symlink switch greatly reduce that inconsistent window.

Sources

$ ./request_review

Facing the same problem in your own store?

Senior WordPress and WooCommerce backend engineering for complex production problems.

Request a Technical Assessment

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *