Creating new web app using yii

In this tutorial I will show you how you can create your very first web application using the yii php framework.

Yiic is the command we will be using to create the webapp.

First thing that you’ll need to do is to download the yii framework.

Then unzip it using a 7-zip, winrar, zip genius, pea zip or any other archive extracting software.

Its not necessary that you will copy the extracted folder to your web accessible folder.

But for this tutorial, just copy it there.

For those of you who are using xampp. Just copy it into your htdocs folder.

Those who use wamp, copy it into the www folder.

What we will be doing next is to add up environment variables.

To do that, just right click on My Computer->Properties->Advanced System Settings->Advanced Tab->Environment Variables


After that, focus on the system variables then scroll down until you find the first path that you will see. Highlight it and click on edit.


Now,  you need to live that window open for a while then search for the folder where you have installed php.

PHP will automatically be installed when you install either xampp or wamp.

For wamp:

-The default installation folder would be C:Wamp

then copy the  address below:


Note: The php version might be different for you, so just navigate to that folder and copy the applicable php version for you

After editing copy the address to your environment variables window. Just be sure to place a semi-colon after the last path that has been added.

As an example, mine looks like this:

C:Program FilesCommon FilesMicrosoft SharedWindows Live;
C:Program Files (x86)Common FilesMicrosoft SharedWindows Live;
c:Program Files (x86)Microsoft SQL Server90Toolsbinn;
C:Program Files (x86)Javajdk1.6.0_18bin;
C:Program Files (x86)Javajdk1.6.0_18lib;
C:Program FilesTortoiseSVNbin;C:devsfprojectlibvendorsymfonydatabin;
C:Program Files (x86)GTK2-Runtimebin;C:Program Files (x86)AutodeskBackburner;
C:Program Files (x86)Windows LiveShared;
C:Program Files (x86)Microsoft SQL Server80ToolsBinn

Yup, that’s a bit of an overkill. If you’re wondering where did I get that one:


Finally, navigate to the directory where you copied the yii framework. Mine is in:


So I added that one to the environment variables as well. As you can see above

You can now fire up the command line. Create the directory where you will install the yii webapp. Then navigate to it


Now type in, yiic webapp [folderWhereYouWillInstallWebApp]


Type, y on your keyboard. Then bam! You will now see something like this when you navigate the directory in your browser:


5 thoughts on “Creating new web app using yii

  1. Thanks buddy you solved my big problem… I kept on trying to make my first program but was confused with the name of all directories used in different blogs … They always use rootfolder it made me bit confused ..
    It seems you are good in framework…so can i ask doubts which may occur in future?
    I am creating a website and my project manager told us to use framework.
    I m totally new to framework as i used to code php in dreamweaver.

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