The information provided in this article is for informational purposes only. Transferring a project created in Laravel to hosting is quite complicated and has certain nuances that only its developer can provide.
To transfer a project to Yii 2, you first need to upload the files to the server. This can be done in several ways:
After uploading files to the server connect over SSH and do the following:
-
Change to the directory with the loaded project by running the command:
cd ~/example.com/www/
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
Run the command:
/usr/local/php70/bin/php yii migrate
To include a project as
production
may be required in file
index.php
replace lines:
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
For such:
defined('YII_DEBUG') or define('YII_DEBUG', false);
defined('YII_ENV') or define('YII_ENV', 'prod');
Check the site is working.
After completing these steps, additional steps may be required to customize the project. In this case, you should contact the project developer to clarify more detailed information.