Tutorial · Laravel
Deploy Laravel with Auto-Provisioned MySQL in 5 Minutes
Upload your Laravel project — we detect it, spin up a MySQL database, generate your .env, run migrations, and serve it. No DevOps required.
Deploying Laravel traditionally means: provision a server, install PHP extensions, set up MySQL, configure .env, run composer install, generate APP_KEY, run migrations, configure Apache, set up SSL. It's a 45-minute process if everything goes right.
On Hostendor, you upload a ZIP and we do all of that automatically. Here's the walkthrough.
Step 1: Prepare your Laravel project
You don't need to change anything. Hostendor's pipeline handles:
- Running
composer installifvendor/isn't shipped - Detecting any
ext-*requirements in your composer.json and installing them - Pointing Apache at
public/(Laravel's front controller)
Just make sure your project has a composer.json and a public/index.php. That's it. ZIP it up.
Step 2: Upload and deploy
Go to hostendor.com/upload. Drop your ZIP. Our analyzer detects "Laravel" from your composer.json and the presence of artisan. Click Deploy.
Behind the scenes, here's what happens:
- Your ZIP is extracted and analyzed
- A PHP-Apache Docker image is built with all required extensions
- A MySQL database is auto-provisioned in the same Docker network
- An
.envfile is generated withDB_HOST,DB_DATABASE,DB_USERNAME,DB_PASSWORD, and a cryptographically randomAPP_KEY php artisan key:generaterunsphp artisan migrate --forceruns (with retry — it waits for MySQL to be ready)php artisan storage:linkruns- The container starts and Apache serves your app
Total time: the build, MySQL provisioning, and migrations usually take a few minutes from upload to live.
Step 3: Your app is live
You'll get a URL like https://<id>.app.hostendor.com with automatic Let's Encrypt SSL. Your .env is pre-configured. Your database is running. Your migrations have been applied.
To connect a custom domain, go to the Domains tab in your service dashboard. Add your domain, point your DNS CNAME to app.hostendor.com, and SSL is issued automatically within minutes.
What about environment variables?
Go to the Settings tab → Environment Variables. Your DB_* and APP_KEY are pre-populated. Add any additional vars your app needs (Mailgun keys, Stripe secrets, etc.). Save, restart, and they take effect immediately.
What about queues and scheduled tasks?
Laravel's queue worker runs inside the same container. For scheduled tasks (the scheduler), add a cron job in the Settings tab that hits php artisan schedule:run every minute.
Deploying updates
Connect your GitHub repo from the Settings tab → Auto Deploy. Push to your repo and Hostendor rebuilds your image and restarts — your database and .env are preserved across redeploys.
Try it now
Upload your Laravel ZIP at hostendor.com/upload. The 14-day trial gives you ₹300 of credit with no card required — deploy your side project, portfolio, or client demo and see it running before you pay.
Hostendor
More from the blog
- Introducing Hostendor: AI-Powered Hosting for Developers Worldwide
We started Hostendor because we got tired of the choice between expensive cloud bills and managing our own DevOps. Here's the platform we wish existed.
- How Our Ops Agents Keep Your Services Running 24/7
Four agents, each doing one thing well, instead of one giant control plane. Here's how we keep your services alive without waking anyone up.