2.8.4.1.2. Transferring Symfony to hosting

Attention!

The information provided in this article is for informational purposes only. Transferring a project created in Symfony to hosting is rather complicated and has certain nuances that only its developer can provide.

To transfer a project to Symfony, you first need to upload the files to the server. This can be done in several ways:

  • In the case of using Git, you can clone the project, connecting to hosting via SSH and running the command:
    git clone http://github.com/example/example_site/
  • Download project files to the server.

After uploading files to the server connect over SSH and do the following:

  1. Change to the directory with the loaded project by running the command:
    cd ~/example.com/www/
  2. Update dependencies and all packages by running the command:
    PATH=/usr/local/php70/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin
    composer update
  3. Customize connection to the database.
  4. If the configuration file is .env, then you may need to run the command:
    composer require symfony/dotenv
  5. Run the command to clear the cache:
    APP_ENV=prod APP_DEBUG=0 php bin/console cache:clear
  6. The following steps only need to be performed if required for your project:
    1. Run the database migration using the command:
      bin/console doctrine:schema:update --force

More information can be found in documentation.

After completing the steps described, additional steps may be required to customize the project. In this case, you should contact the project developer to clarify more detailed information.

Content