Developed a project using Yii2 basic and composer on a local server. Now I want to transfer it to a simple hosting. Tell me, please, how to do it correctly, especially interested in the question:

  1. Need to transfer only files yii2 or composer too?
  2. If you need to transfer, and then install the composer on the hosting, then this is done via ssh?
  3. Hosting supports installing composer only through VPS, can I transfer and run the project meringue transfer composer?
  • 2
    On a fighting server kompozer? You will not be there to download something with it .. Just copy the project ... just need to make sure that the versions of php, mysql are the same ... Plus, it is desirable to develop or test everything on the local Linux machine (trite to put a virtualbox). For hosts on linux everything. And development if on Windows - maybe a little something is not right ... but this seems to be not such a frequent phenomenon - Alexey Shimansky

1 answer 1

  1. Ask for ssh access;
  2. If you have a project under version control, then you need to install git or svn, depending on what you have.
  3. Install ssh composer.
  4. Make a clone of your project to the server.
  5. then composer install
  6. Perform migration.

If your project is not under version control, then ftp access is enough, just take and copy files to the server, composer is not needed.

You also need to consider that the folder, which in yii2, web, on the server can be called public_html. To do this, make a symbolic link to the folder