Deploy PHP Laravel to Production in 60 Seconds
Deploy and scale modern PHP 8.3 & Laravel 11 apps on Deployxa with automated Composer builds, database migrations, Redis queues, Octane speed, and free SSL.
💻 CLI Quickstart
1-StepInstall the Deployxa CLI and deploy your application directly from your terminal:
npm install -g @deployxa/cli
deployxa login
deployxa up --framework laravel
📄 deployxa.json Blueprint
OptionalOptional manifest for custom workers, cron jobs, and build commands:
{
"name": "my-laravel-app",
"framework": "laravel",
"runtime": "php-8.3",
"webroot": "public",
"build": "composer install --optimize-autoloader --no-dev",
"deploy": [
"php artisan config:cache",
"php artisan route:cache",
"php artisan view:cache",
"php artisan migrate --force"
],
"workers": [
{
"name": "queue-worker",
"command": "php artisan queue:work --tries=3 --timeout=90"
}
],
"cron": [
{
"name": "artisan-schedule",
"schedule": "* * * * *",
"command": "php artisan schedule:run"
}
]
}
How to Deploy Laravel to Production
Follow these simple steps to move your Laravel codebase from local development to a globally scaled production environment.
Connect Your GitHub / GitLab Repository
Link your repository. Deployxa automatically detects composer.json, selects PHP 8.3 runtime, and configures the public/ webroot directory.
git remote add deployxa https://git.deployxa.com/org/laravel-app.git
git push deployxa main
Provision Managed MySQL & Redis
Attach an isolated managed MySQL 8.0 database and Redis memory cluster in 1 click. Connection credentials automatically inject into environment variables.
deployxa db:create --type mysql --name laravel-db
deployxa redis:create --name laravel-cache
Automated Build, Cache & Migration Execution
Deployxa runs composer install with optimized class maps and triggers php artisan migrate --force without downtime during deployment rollouts.
php artisan config:cache && php artisan route:cache && php artisan migrate --force
Background Queue Workers & Cron Scheduler
Built-in supervisor daemons maintain persistent queue:work listeners and trigger artisan schedule:run every minute automatically.
php artisan queue:work --queue=high,default --tries=3
Production Architecture & Capabilities
FrankenPHP / Nginx FastCGI
High-throughput async execution with Caddy/FrankenPHP or optimized Nginx PHP-FPM.
Automated HTTPS / TLS 1.3
Let's Encrypt SSL certificates automatically provisioned and renewed for apex & custom domains.
Persistent Storage Symlinks
Zero-downtime atomic symlink switching with persistent storage/app/public mount preservation.
Redis Cache & Session Clustering
Sub-millisecond session persistence and cache tags acceleration.
Recommended Environment Variables
| Variable Key | Description | Production Example |
|---|---|---|
| APP_ENV | Application environment mode | production |
| APP_KEY | Encryption key generated by artisan key:generate | base64:... |
| APP_DEBUG | Disable detailed error pages in production | false |
| DB_CONNECTION | Database driver connection string | mysql |
| DB_HOST | Internal VPC hostname for managed database cluster | mysql.internal |
| CACHE_STORE | Redis memory store for high-concurrency caching | redis |
| QUEUE_CONNECTION | Background job dispatch queue handler | redis |
Performance Benchmarks vs Traditional Hosting
| Benchmark Metric | Deployxa Cloud | Traditional VPS / Legacy PaaS |
|---|---|---|
| Cold Start Latency | 0ms (Always Hot) | 450ms - 2.5s |
| Requests per Second | 4,200 RPS (Octane) | 650 RPS (Traditional FPM) |
| Build & Deploy Duration | 18 seconds | 2.5 - 4.0 minutes |
| SSL Provisioning | Instant (< 3s) | Manual DNS validation |
Frequently Asked Questions
How does Deployxa handle Laravel database migrations?
Deployxa provides zero-downtime deployments by executing `php artisan migrate --force` inside the isolated release container before switching the edge traffic router. If migrations fail, the deployment is aborted without impacting live user traffic.
Can I run Laravel Queue Workers (Horizon) and Crons?
Yes! Deployxa natively supports background worker processes and cron scheduler daemons. You can define queue listeners like `php artisan queue:work` or `php artisan horizon` in your `deployxa.json` manifest, and Deployxa will supervise their execution 24/7 with automatic restart policies.
How are storage files and symlinks managed in Laravel?
Deployxa attaches persistent NVMe block storage to `/storage` and automatically runs `php artisan storage:link` on every deploy. Uploaded user files and media assets remain safe across deployments and container rebuilds.
Does Deployxa support Laravel Octane with FrankenPHP or Swoole?
Yes! Deployxa features native first-class support for Laravel Octane using FrankenPHP or RoadRunner, providing up to 5x higher throughput and sub-10ms response times.
Ready to ship your Laravel app?
Get your live HTTPS production URL with zero server management in under 60 seconds.