We use cookies
We use cookies to optimize our website. By continuing to browse the site, you agree to our use of cookies.
New design
Control panel
  • Русский
  • Українська
  • English
  • UAH
  • USD
  • RUB
  • EUR
  • 0-800-307-307 Hotline
  • +38 (044) 392-74-33 Kiev
  • +38 (057) 728-39-00 Kharkiv
  • +38 (056) 794-38-31 Dnipro
  • +38 (032) 229-58-93 Lviv
  • +38 (048) 738-57-70 Odessa
  • +38(093) 170-15-42  Life
  • +38 (067) 400-88-44 Kievstar
  • +1(888)393-24-51  USA, Toll free
  • +44(131)507-01-14  Great Britain
  • +7 (499) 348-28-61 Moscow

2.14.4.1. Installing Yii 2

To install Yii 2, do the following:

  1. Connect to hosting via SSH.
  2. Go to your site directory:
    cd ~/name_site.com
  3. Install Composer Asset Plugin (manages bower and npm package dependencies):
    composer global require "fxp/composer-asset-plugin:^1.2.0"
  4. If you are not registered on GitHub, register, then go link and create a token for accessing the repositories (you will need it during installation).
  5. Install Yii 2:
    • To install the Yii 2 Basic Application Template, run the command:
      composer create-project yiisoft/yii2-app-basic www

      Instead www substitute the path where the framework is installed.

    • To install the Yii 2 Advanced Application Template, execute two commands in turn:
      composer create-project yiisoft/yii2-app-advanced www
      php www/init

      In each of the teams, instead of www substitute the path where the framework is installed.