

for frontend /path/to/yii-application/frontend/web/ and using the URL.Open a console terminal, apply migrations with command /path/to/php-bin/php /path/to/yii-application/yii migrate. path/to/php-bin/php /path/to/yii-application/init - env=Production -overwrite=AllĬreate a new database and adjust the components configuration in common/config/main-local.php accordingly. If you automate it with a script you can execute init in non-interactive mode. path/to/php-bin/php /path/to/yii-application/init Open a console terminal, execute the init command and select dev as environment. Preparing application ¶Īfter you install the application, you have to conduct the following steps to initialize Then follow the instructions given in the next subsection. Install from an Archive File ¶Įxtract the archive file downloaded from toĪ directory named advanced that is directly under the Web root. You can choose a different directory name if you want. The second command installs the advanced application in a directory named yii-application. Which allows managing bower and npm package dependencies through Composer. The first command installs the composer asset plugin With Composer installed, you can then install the application using the following commands: composer global require "fxp/composer-asset-plugin:~1.1.1"Ĭomposer create-project -prefer-dist yiisoft/yii2-app-advanced yii-application Installing Yii section of the definitive guide to install it. If you do not have Composer, follow the instructions in the (You can read here how to change directories in command prompt) Open terminal ( cmd.exe), change directory to project root and run commands: vagrant plugin install vagrant-hostmanager copy to vagrant-local.ymlĪdd the following lines to hosts file: 192.go into directory yii2-app-advanced-master/vagrant/config.You just need to wait for completion! After that you can access project locally by URLs: Run commands: vagrant plugin install vagrant-hostmanager Place your GitHub personal API token to vagrant-local.ymlĬhange directory to project root: cd yii2-app-advanced.This installation way doesn't require pre-installed software (such as web-server, PHP, MySQL etc.) - just do next steps! Manual for Linux/Unix users ¶Ĭp vagrant-local.yml This way is the easiest but long (~20 min). But do you know the list of seeded path aliases that come shipped with a basic or advanced app? Here is my attempt to list them.The minimum requirement by this project template is that your Web server supports PHP 5.4.0. If you are coming over from Yii 1.x to Yii 2, and already read this guide, you may note that namespaces are very important in Yii 2 to identify classes.
