Hello Guys, If my blog posts are helpful to you then give some comment and ratings, if you found any bug also. So that if there are bugs or issues, I can resolve those bugs in next versions.

How to Install YII in Wamp?


Now a days so many people are looking in to the "YII" Framework, including me. So I tried to install the YII in my local system, having Wamp 2.2c. Not sure about other, but I faced some issue to install "YII" on my local host.

So I explored some time and finally able to install successfully "YII" in local System. I am thinking that it would be good to share "How to Install YII in Wamp".

To install 'YII' follow the below steps to install "YII" in you wamp server.

1. First step is inserting the Environment Variable for "php" in to your windows system to run the "YIIC" command successfully.

I. Right Click on "My Computer" ==> and select "Properties"

II. Now you will see the System Properties window. Select "Advanced" tab.

III. From that tab click on "Environment Variables" above to "OK" button.

IV. From the "System Variables" select the "Path" and click "Edit" button.

V. Now you will see the "Edit System Variable" with "Variable name" and "Variable value" Fields

VI. Enter "D:\wamp\bin\php\php5.3.9" (php5.3.9 is my php version in the D:\wamp\bin\php folder) at the end of "Variable value" without double quotes.

VII. Now click "Ok" for all the opened windows.

2. Now I have downloaded the "YII" from 'http://www.yiiframework.com/download/' and I have extracted the zip file in to the "D:\wamp\www\yii\" folder.

3. Before running "YIIC" command check system requirement to satisfy the 'YII' framework by running this URL : http://localhost/yii/requirements/

(This 'YIIC' command is for generating the YII framework files and folder for your site). Once all the requirements are satisfied then follow the below steps.

4. Open command prompt by Win + R and type "cmd" then click ok.

5. Move the current directory from "C:\Documents and Settings\username>" to "D:\wamp\www\yii"

a.  > D: (enter)

b. D:\>cd wamp\www\yii\framework

c. Run this command from here : yiic webapp d:\wamp\www\mysite (mysite is the your site folder name) then the output should be like below...

D:\wamp\www\yii\framework>yiic webapp d:\wamp\www\mysite
Create a Web application under 'D:\wamp\www\mysite'? [yes|no] yes

d. type 'yes' and press enter.

6. Now you have finished your installation and it show the below message : Your application has been created successfully under D:\wamp\www\mysite.

Now you are ready to use your application by accessing the URL : http://localhost/mysite/.

Thanks
Follow fornandakishore on Twitter