Migrate from Laravel Vapor to Laravel Cloud

Users who’ve migrated from Vapor to Cloud report cost reductions of up to 30% and speed gains of around 7%. If you’re ready to make the switch, this guide walks you through migrating your application from Vapor to Cloud.

Burger Close

Guide

Why Migrate from Laravel Vapor to Cloud?

We are surprised by the difference in feel of the site. According to Nightwatch, we won <100 ms per request, but each page feels much snappier. The gain of 100 ms per call in multiple calls in a page only adds to that feeling.”

François-Alexandre Perreault

François-Alexandre Perreault

Solutions Architect at Pyle

Prerequisites

  • Access to your current Vapor application and database
  • Git repository connected to a supported provider (GitHub, GitLab, Bitbucket)
  • Database credentials for your existing Vapor MySQL/Postgres database
  • DNS management access for your domain
  • A Laravel Cloud account

If you already have all these prerequisites in place, lower your DNS TTL 24 hours before migration for faster propagation.

Laravel Vapor to 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.

Have a complex migration and need assistance? Contact sales.

Create your new application

  • From your 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 (8.3+).
    • Set environment variables (copy from Vapor UI or .env).
    • Add any secrets your application needs.

Don't deploy yet. Set up your infrastructure first by following the next steps. For more info, here’s how you can configure your application.

Provision your new infrastructure

Create the resources your application needs:

MySQL/Postgres database
  • In your environment's infrastructure canvas, add a Database.
  • Choose MySQL or Postgres (match your Vapor configuration).
  • Select compute size based on your needs.
  • Enable public endpoint for migration (you can disable after).
  • 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
  • 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.

Cloud automatically injects connection credentials as environment variables, so no manual configuration is needed.

You’ve now set up a new Laravel Cloud account and provisioned all necessary infrastructure. You can now migrate your Vapor application to Cloud.

Prepare to migrate

  • Log into your Vapor account.
  • Get your Vapor database credentials:
    • Check Vapor dashboard → Project → Environment → Database
    • Or check your Vapor environment variables

Migrate your database

With your new Cloud database provisioned and public endpoint enabled:

Finding your Cloud database credentials:

  • Cloud dashboard → Environment → Database → Connection Details
  • Credentials are also injected as environment variables

For MySQL

Export from Vapor
# From your local machine
mysqldump \
  --host="vapor-db-host" \
  --port="vapor-db-port" \
  --user="vapor-db-username" \
  --password="vapor-db-password" \
  --single-transaction \
  --routines \
  --triggers \
  --events \
  "vapor-db-database" > "dump-file.sql"
Import to Cloud
# From your local machine
mysql \
  --host="cloud-db-host" \
  --port="cloud-db-port" \
  --user="cloud-db-username" \
  --password="cloud-db-password" \
  "cloud-db-database" < "dump-file.sql"

For Postgres

Export from Vapor
# From your local machine
pg_dump \
  -Fc \
  -f "dump-file.bak" \
  "postgresql://vapor-db-username:vapor-db-password@vapor-db-host:vapor-db-port/vapor-db-database"
Import to 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 Cloud by hitting the “Deploy” button. Follow the next steps to test if everything is working correctly.

Test your Cloud deployment

Before switching DNS:

  • Deploy your application: Click the Deploy button in Cloud.
  • Verify deployment: Check the deployment logs for any errors.
  • Test using 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 Cloud

Once verified, point your domain to Cloud:

  • In the Cloud dashboard, go to Domains and add your custom domain.
  • 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 Cloud database for security.
  • Your application will continue to access it via private network.

End your Vapor subscription

Once you’ve successfully deployed and tested your application, don’t forget to cancel your Vapor subscription. If you were only using AWS for the application you migrated to Cloud, you can also cancel your AWS subscription since no third-party infrastructure providers are needed with Cloud.

Successfully migrated? Email Support ([email protected]) with your Vapor email and Cloud email, and we’ll send you a code for $50 off on Laravel Cloud.

Common migration scenarios

Scenario 1: Standard Laravel app

Vapor setup: MySQL + Redis + S3 assets + queues

Cloud setup: MySQL database + Redis + object storage + Queue cluster for intelligent scaling

Estimated migration time: 30-60 minutes

Scenario 2: API-only application

Vapor setup: Aurora Serverless + ElastiCache

Cloud setup: Postgres database + Redis

Estimated migration time: 20-40 minutes

Scenario 3: Multi-environment setup

Vapor setup: Production + staging environments

Cloud setup: Create separate environments in the same application

Estimated migration time: 45-90 minutes per environment

Code changes required

Minimal changes needed

Most Laravel applications require zero code changes to migrate from Vapor to Cloud.

Storage configuration

If you use Vapor's S3 direct uploads, update to Cloud's object storage:

// config/filesystems.php - usually no changes needed 's3'=>[ 'driver'=>'s3' , 'key'=>env('AWS_ACCESS_KEY_ID'), 'secret'=>env('AWS_SECRET_ACCESS_KEY'), 'region'=>env('AWS_DEFAULT_REGION'), 'bucket'=>env('AWS_BUCKET'), // Cloud injects these automatically ],

Remove Vapor-specific code

You can remove the laravel/vapor-core package:

composer remove laravel/vapor-core

Remove any Vapor-specific middleware or configuration from your application, as well as the vapor.yml file.

Rollback plan

Before migrating production:

Create your new application

  • Keep Vapor running until Cloud is fully validated.
  • Parallel run: Test Cloud with real traffic using the Cloud URL.
  • Database sync: If needed, you can sync databases before final cutover.
  • DNS rollback: Keep old DNS records documented for quick rollback.

Zero-risk migration? Run both platforms simultaneously and gradually shift traffic.

Post-migration validation

After successful migration:

1. Configure auto-scaling

Set appropriate min/max replicasbased on your traffic patterns.

2. Enable auto-hibernation

For staging/development environmentsto reduce costs.

3. Set up queue clusters

Leverage Cloud's autoscaling queue workersfor background jobs.

4. Monitor performance use

Use Cloud's built-in metricsto optimize compute resources.

5. Review costs

Compare your Cloud usage coststo previous Vapor + AWS bills.

Your Laravel Vapor to Cloud migration is now complete!

Migrating from Laravel Vapor to Cloud gives you a cleaner workflow, faster deployments, and predictable performance without the overhead of managing AWS services.

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.

Need extra guidance?

Migration assistance

Contact sales for complex migrations

Frequently asked questions

Most applications can be migrated in under an hour. Complex apps may take 2-4 hours.

No. Keep Vapor running while you set up Cloud, then switch DNS when ready.

You can keep using external AWS services (S3, SES, etc.); just update environment variables.

Yes, but why would you want to? Keep your Vapor deployment until you're confident in Cloud.

Cancel it once migration is complete and validated.

In most cases, no. Laravel Cloud is designed to work with standard Laravel applications.

Copy them from Vapor UI to Cloud's environment variable settings. Cloud auto-injects infrastructure credentials.

Laravel's scheduler works the same on Cloud, no changes needed.

Documentation

cloud.laravel.com/docs

Migration Assistance

Contact sales for complex migrations.

We are surprised by the difference in feel of the site. According to Nightwatch, we won <100 ms per request, but each page feels much snappier. The gain of 100 ms per call in multiple calls in a page only adds to that feeling.”

François-Alexandre Perreault

François-Alexandre Perreault

Solutions Architect at Pyle

Ready to focus on shipping?

Let's build the incredible together, with Laravel