Please Note: If you haven’t yet installed Composer please install it according to the instructions given in my previous post Installing Composer in 7 Steps as you can’t install Laravel 4.2 without first installing the Composer.
Let’s start installing Yii 2 by following these 3 steps.
Press win+R from key board to open “Run Dialog Box” and type ‘cmd’ in the “Open” text box and hit Enter Key.
change directory to “wamp/www” and type the following command in command prompt.
composer create-project --prefer-dist yiisoft/yii2-app-basic basic
On my PC it will look some thing like this:
E:\wampwww>composer create-project --prefer-dist yiisoft/yii2-app-basic basic
After installation we’ll check whether every thing is going right or not. So, open any browser and type the following address in address bar.
You should see the following page in your browser which means you’ve successfully installed Yii2 basic on your local server.
If you further want to learn about any other PHP Framework and if you don’t know how to install it, don’t worry, a list of famous PHP Frameworks is given as follows. Just click the link and start installing your next favorite PHP Framework.