I was struggling to understand a code-base based on Yii2 framework and after few hours of struggle, I decided to install Yii2 and use it in a sample application.
I followed below steps:
Step 1: Install wamp server from http://sourceforge.net/projects/wampserver/files/ . I installed it in C:\Development\Tools\wamp [this will install PHP and MySQL as well)
Step 2: Open command prompt and move to C:\Development\Tools\wamp\bin\
Step 3: Set PHP in your windows path variable – for my installation I did as below C:\Development\Tools\wamp\bin>set path=C:\Development\Tools\wamp\bin\php\php5.5.12;%path%
Step 4: Let us install composer – Create a directory composer
Step 5: Move to C:\Development\Tools\wamp\bin\composer and type
php -r “readfile(‘https://getcomposer.org/installer’);” | php
Step 6: Install Composer Asset Plugin by issuing below command – php composer.phar global require “fxp/composer-asset-plugin:1.0.0”
Step 7: Let us install Yii2 framework – move to C:\Development\Tools\wamp\www\
– the web root directory of wamp installation.
Step 8: Execute below command – php C:\Development\Tools\wamp\bin\composer\composer.phar create-project yiisoft/yii2-app-basic
Step 9: Yii2 framework is installed with basic template – let’s verify it. Start the wamp server and point your browser to http://localhost/yii2-app-basic/web/ . Congratulations!!