How to move Laravel Project from localhost to production server

I just created a simple Laravel Application. I now would like to move to production (shared hosting) just to see how it will perform on a live server. I would appreciate if anyone could explain me what are the steps to do so.

henrik-nordstrom replied 1 year ago

Normally you would use source control (i.e. GIT). But if you are really just looking to test it once you can FTP the files over. You don't need to move the vendor directory. Then configure you database on the server and put the login details in your .env file. Then run a "composer install" which will bring your packages (vendor folder) in. Then run a "php artisan migrate", to get your database tables set up.

This is kind of quick & dirty. But it will get the job done. I suggest you look into GIT and which will make your life a lot easier in the long run.

alemioma replied 1 year ago

Hallo! Look at this tutorial

ilinovster replied 1 year ago

Very useful tutorial for moving on shared host:

larafeed replied 2 weeks ago

You can do it through git. Connect through ssh and deploy using Git. I wouldn't recommend shared hosting for Laravel projects. It is better to go with a cloud infrastructure. If you don't know how to setup your own server on cloud, then you can do it using Cloudways Laravel hosting platform that gives you managed laravel servers in one click.

Sign in to participate in this thread!

We'd like to thank these amazing companies for supporting us