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. 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, or 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 a supported PHP version.
- 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 the public endpoint for the migration (you can disable it afterward).
- Laravel Cloud automatically configures Laravel environment variables.
Laravel Valkey for cache and session storage
- Add Redis-compatible Laravel Valkey to your infrastructure canvas. This replaces Heroku Redis. Fully managed AWS ElastiCache caches (both Valkey and Redis OSS) are also available on Laravel Private Cloud.
- Laravel Cloud automatically configures your environment variables.
Object storage (S3-compatible)
- Add object storage if you use file uploads.
- Update your filesystems.php configuration to use Laravel Cloud object storage.
You've set up your Laravel Cloud account and provisioned the infrastructure. Now you can migrate your Heroku application to Laravel Cloud.
Prepare to migrate
- Log in to 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:
Find your Laravel Cloud database credentials
- Application dashboard → Environment → Database → Connection Details
- Credentials are also injected as environment variables
Export from Heroku
# From your local machine
pg_dump \
-Fc \
-f "dump-file.bak" \
"postgresql://heroku-db-username:heroku-db-password@heroku-db-host:heroku-db-port/heroku-db-database"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 provides the DNS records (A or 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 keeps access to it over the 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
Standard Laravel app
Heroku: Postgres + Redis + S3/assets + queues
Laravel Cloud: Postgres database + Valkey + object storage + managed queues for automatic scaling
API-only application
Heroku: Postgres + Heroku Redis or similar
Laravel Cloud: Postgres database + Valkey
Multi-environment setup
Heroku: Production + staging apps
Laravel Cloud: Separate environments in the same application
Private Spaces to Private Cloud
Heroku: Private Spaces
Laravel Cloud: Private Cloud
Post-migration optimization
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 managed queues
Use Laravel Cloud's managed queues for background jobs.
4. Monitor performance
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.
Getting help
- Visit documentation
- Check Cloud's Quickstart documentation
- Migration assistance
- Contact support for complex migrations
What customers say
“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
Frequently asked questions.
Ready to focus on shipping?
Let's build the incredible together, with Laravel. Start now with $5 in usage credit.