Question

How to Migrate Existing Laravel Website to DigitalOcean?

We’re completely new to DigitalOcean and VPSes and we have an existing Laravel project that we’d like to migrate over to DigitalOcean. We’ve had it on various shared hosting platforms for a while now but have decided to finally make the switch over to DigitalOcean.

What would be the best way to migrate the Laravel files, MySQL database and email accounts over to our DigitalOcean account? All the different options are a little overwhelming and it would be greatly appreciated if someone could point us in the right direction.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
October 27, 2022

Hi there,

I could suggest two options:

  • Use the DigitalOcean App Platform. That way you will not have to do any server configuration and you will be able to just define link your GitHub project with the App Platform and then let it do the rest in terms of building and deploying your project every time you make a change.

Here is a quick video on how to deploy your Laravel App on the App Platform:

Then for your existing MySQL database, you could create a managed MySQL cluster and import your database as described in the docs here:

https://docs.digitalocean.com/products/databases/mysql/how-to/import-databases/

  • Alternatively, rather than using the App platform, you could spin up a Laravel Droplet with 1-Click using this image here:

https://marketplace.digitalocean.com/apps/laravel

That is just a standard unmanaged Linux server where you will have root access and will be able to make any changes that you need. Once the server is ready, you could use git clone to clone your existing Laravel GitHub project on the server and then run the standard composer install to get all of the dependencies installed.

If you decide to go with a Droplet rather than the App Platform, you could also use a Managed Database, or if you prefer you could use the MySQL installed that would be already installed on that Droplet.

Let me know if you have any questions.

Hope that this helps!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel