Migrate from Heroku to Laravel Cloud
Users who've migrated from Heroku to Laravel Cloud estimate cost reductions of up to 50%. If you're ready to make the switch, this guide walks you through migrating your application from Heroku to Cloud.
Start in Cloud with $5 in free usage credit.


Why Migrate from Heroku to Laravel Cloud?
Reduce infrastructure costs. Users who migrated from Heroku to Laravel Cloud estimated savings of up to 50% in infrastructure costs.
Built for Laravel, not adapted for it. Heroku is a general-purpose PaaS that relies on buildpacks, Procfiles, and manual PHP configuration. Laravel Cloud is purpose-built for Laravel, with framework-aware defaults and no boilerplate setup required.
Consistent, zero-downtime deployments. Heroku build times vary depending on buildpack configuration and slug size. Laravel Cloud is optimized specifically for Laravel applications, delivering reliable sub-minute deployments with zero-downtime releases included by default.
More included, fewer add-ons. Features such as edge caching, DDoS protection, and auto-hibernation are built into Laravel Cloud. On Heroku, comparable functionality typically requires multiple paid add-ons and additional configuration.
“Laravel Cloud provides the programmable, seamless infrastructure that mirrors our own ambition, allowing us to slash our spend by 50% and shift our focus from managing servers to building the future of insurance.”

Craig Morris
Technical Program Manager at Superscript
Prerequisites
- Access to your current Heroku application and Postgres database
- Git repository connected to a supported provider (GitHub, GitLab, Bitbucket)
- Database credentials for your existing Heroku Postgres database
- DNS management access for your domain
- A Laravel Cloud account
Heroku to Laravel Cloud: Migration steps
Set up Laravel Cloud account
Create your account at cloud.laravel.com and set up your organization. Have questions? Check our Laravel Cloud Quickstart documentation.
Create your new application
- From your Laravel Cloud dashboard, click + New application.
- Connect your Git provider (GitHub, GitLab, or Bitbucket).
- Select your repository and branch.
- Configure your environment settings:
- Choose PHP version from the list of supported versions.
- Set environment variables (copy from Heroku or .env).
- Add any secrets your application needs.
Provision your new infrastructure
Create the resources your application needs:
Postgres database
- In your environment's infrastructure canvas, add a Database.
- Choose Postgres (Heroku uses Postgres).
- Select compute size based on your needs.
- Enable public endpoint for migration (you can disable after).
- Laravel Cloud automatically configures Laravel environment variables.
KV store for cache/session storage
- Add a KV Store resource to your infrastructure canvas.
- Choose Redis or Valkey
- Laravel Cloud automatically configures Laravel environment variables.
Object storage (S3-compatible)
- Add Object storage if you use file uploads.
- Update your filesystems.php configuration to use the Laravel Object Storage.
You've now set up a new Laravel Cloud account and provisioned all necessary infrastructure. You can now migrate your Heroku application to Laravel Cloud.
Prepare to migrate
- Log into your Heroku account.
- Get your Heroku database credentials:
- Check Heroku dashboard → Datastores → Credentials
Migrate your database
With your new Laravel Cloud database provisioned and public endpoint enabled:
Finding your Laravel Cloud database credentials:
- Application dashboard → Environment → Database → Connection Details
- Credentials are also injected as environment variables
Export from Heroku
Import to Laravel Cloud
# From your local machine
pg_restore \
--clean \
--no-owner \
--no-acl \
--if-exists \
--dbname="postgresql://cloud-db-username:cloud-db-password@cloud-db-host:cloud-db-port/cloud-db-database" \
"dump-file.bak"At this point, you are ready to deploy your application to Laravel Cloud by hitting the "Deploy" button. Follow the next steps to test if everything is working correctly.
Test your Laravel Cloud deployment
Before switching DNS:
- Deploy your application: Click the Deploy button in Laravel Cloud.
- Verify deployment: Check the deployment logs for any errors.
- Test using Laravel Cloud URL: Every environment gets a .laravel.cloud URL.
- Run smoke tests: Verify critical functionality works.
- Check background jobs: Ensure queues are processing correctly.
Switch DNS to Laravel Cloud
Once verified, point your domain to Laravel Cloud:
- In the Laravel Cloud dashboard, go to Domains and add your custom domain.
- Laravel Cloud will provide DNS records (A/CNAME).
- Update your DNS provider with the new records.
- SSL certificates are automatically provisioned and renewed.
Disable public database endpoint (optional)
After migration is complete and stable:
- Disable the public endpoint on your Laravel Cloud database for security.
- Your application will continue to access it via private network.
End your Heroku subscription
Once you've successfully deployed and tested your application, don't forget to cancel your Heroku add-ons and dynos. You can remove the Heroku app or keep it for reference until you're confident in Laravel Cloud.
Common migration scenarios
Scenario 1: Standard Laravel app
Heroku setup: Postgres + Redis + S3/assets + queues
Laravel Cloud setup: Postgres database + Redis + object storage + Queue cluster for intelligent scaling
Estimated migration time: 30-60 minutes
Scenario 2: API-only application
Heroku setup: Postgres + Heroku Redis or similar
Laravel Cloud setup: Postgres database + Redis
Estimated migration time: 20-40 minutes
Scenario 3: Multi-environment setup
Heroku setup: Production + staging apps
Laravel Cloud setup: Create separate environments in the same application
Estimated migration time: 45-90 minutes per environment
Scenario 4: Heroku Private Spaces to Private Cloud
Heroku setup: Private spaces
Laravel Cloud setup: Private cloud
Estimated migration time: Contact sales
Post-migration validation
After successful migration:
1. Configure autoscaling
Set appropriate min/max replicas based on your traffic patterns.
2. Enable auto-hibernation
For staging/development environments to reduce costs.
3. Set up queue clusters
Leverage Laravel Cloud's autoscaling queue workers for background jobs.
4. Monitor performance use
Use Laravel Cloud's built-in metrics to optimize compute resources.
5. Review costs
Compare your Laravel Cloud usage costs to previous Heroku bills.
Your Heroku to Laravel Cloud migration is now complete!
Migrating from Heroku to Laravel Cloud gives you a cleaner workflow, faster deployments, and predictable performance without the overhead of managing Heroku add-ons and dynos.
With zero-config environments, autoscaling, and a straightforward infrastructure model, most applications can be migrated in under an hour.
By following the steps in this guide, you can transition smoothly and start taking advantage of Laravel Cloud's simpler, more cost-effective platform.
Why migrate from Heroku to Laravel Cloud?
Need extra guidance?
Visit documentation
Migration assistance
Contact sales for complex migrations
AI-assisted migration
Using an agent for your migration? Copy the URL into your terminal.
Frequently asked questions
“Laravel Cloud provides the programmable, seamless infrastructure that mirrors our own ambition, allowing us to slash our spend by 50% and shift our focus from managing servers to building the future of insurance.”

Craig Morris
Technical Program Manager at Superscript
Ready to focus on shipping?
Let's build the incredible together, with Laravel. Start now with $5 in usage credit.