Installing Yii2 in 3 Steps

Part 2: Downloading and Installing Yii 2

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.

Step 1:

Press win+R from key board to open “Run Dialog Box” and type ‘cmd’  in the “Open” text box and hit Enter Key.

Step 2:

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:\\wamp\www>composer create-project --prefer-dist yiisoft/yii2-app-basic basic

It will take some time to complete the installation. So be patient and wait a bit until installation gets completed.

Step 3:

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.

yii2_home_pageCongrats! You’ve successfully installed Yii2.

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.



4 thoughts on “Installing Yii2 in 3 Steps

  1. Hi, It does not work with my windows installation.
    Windows 10
    PHP standalone installation
    Apache standalone installation
    MySQL standalone installation

    Getting all sort of error for adding different paths to path variable after adding all still getting a final warning and composer does not get installed.

    If I check composer installation from command prompt it gives following error:

    C:\>composer -V

    is_file(): open_basedir restriction in effect. File(./composer.json) is not
    within the allowed path(s): (C:\Program Files (x86)\Apache Software Founda


      1. Well I checked that too. Step 3 and Step 6 never show up in process. I tried several times. Just before the step 7 screen it does show one warning message to not having access to path ./


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s