skip to Main Content

I’m uploading my first Laravel project via FTP from my local to my server (Hostgator in this case).

I set it going this morning and it took hours as there are 35000 files! When it finally uploaded there were some errors that required a composer update (PHP version differences). As I’ve no idea what files were updated I had to upload the project again…but this is taking an age again.

I tried setting filezilla to only upload if newer but it didn’t really seem to make much difference.

What am I doing wrong here? Is this the correct way to deploy a Laravel project? Ie just copy the the entire folder structure?

Many thanks

2

Answers


  1. Firstly ou can use git for manage your code. If your local and server PHP versions are different, You must upgrade your server or downgrade your local. Otherwise, you may some problems because of different versions. Already there is a problem.

    Also, you can use docker container. You can work on docker container on your local, after development, you just need to run same docker container on your server.

    I hope it helps you.

    Login or Signup to reply.
  2. I think you uploaded the vendor folder too, it is contain many packages with many files, it will slow down the uploading process. You can upload the folder without vendor folder, then run composer install on your server to get the packages.

    Or for best solution, you should use git instead of uploading the file one by one. You have to create git and then at your server, just do the git clone, I think the cloning process will be less than 1 minute.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search