Manage cookies that are used for advertising, such as ad personalization, remarketing, and ad effectiveness analysis.
2.8.4.1.2. Transfer Symfony to hosting
Attention!
The information provided in this article is for informational purposes only. Migrating a Symfony-based project to a hosting environment is quite complex and involves certain nuances that only the project’s developer can anticipate.To transfer a project on Symfony, you first need to upload the files to the server. There are several ways to do this:
- If you're using Git, you can clone the project by connecting to the hosting via SSH and running the following command:
git clone http://github.com/example/example_site/ - Upload project files to the server.
After uploading the files to the server connect via SSH and perform the following steps:
- Go to the directory containing the downloaded project by running the following command:
cd ~/example.com/www/ - Update your dependencies and all packages by running the following command:
PATH=/usr/local/php70/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin composer update - Configure the database connection.
- If you are using
.envas the configuration file, you may need to run the following command:composer require symfony/dotenv - Run the command to clear the cache:
APP_ENV=prod APP_DEBUG=0 php bin/console cache:clear - Perform the following steps only if they are necessary for your project:
- Start the database migration using the following command:
bin/console doctrine:schema:update --force
For more information, see the documentation.
After completing the steps described above, additional steps may be required to configure the project. In this case, please contact the project developer for further details.