Setup Yii Web Application Framework in Localhost

Yii (Yes It Is) is a free, open-source web application development framework. It’s a high-performance PHP framework best for developing Web 2.0 applications.

Here are the steps to setup Yii web application framework in localhost. It’s tested on Windows 7 Home with XAMPP server, might be similar on WAMP.

Step 1: Download Yii Framework from their website.
Extract the zip, rename the folder as ‘yii’ and put it in your XAMPP’s htdocs folder.

Step 2: Go to My Computer -> Properties ->Advanced System Settings-> Environment Variables
On System Variables, scroll to find ‘Path’ variable, select it and click ‘Edit’
Add ‘;F:\xampp\php;F:\xampp\htdocs\yii\framework’ at the end and Click Ok.
Here ‘F:’ refers to the drive where XAMPP is installed.

Yii Environmental Variables Setting

Step 3: Now edit the yiic.bat file located at the F:\xampp\htdocs\yii\framework\yiic.bat
Set ‘ PHP_COMMAND=F:\xampp\php\php.exe’

Step 4: Open Command Prompt (Windows+R, Type ‘cmd’ and enter)
In C: prompt type ‘F:’ enter and then type ‘F:/>cd xampp/htdocs/yii/’
Type ‘F:\xampp\htdocs\yii\yiic webapp yiitest’ and then type ‘yes’.

Yii Create New App

Step 5: Now go to F:\xampp\htdocs\yii\ and cut the ‘yiitest’ folder and paste to root i.e. htdocs folder.
Again go to ‘F:\xampp\htdocs\yii’ and copy the ‘framework’ folder then paste to ‘yiitest’ folder.
Finally edit the ‘index.php’ file from ‘yiitest’ folder and update the ‘$yii’ path to
$yii=dirname(__FILE__).’/framework/yii.php’;

Step 6: Open your browser and type ‘http://localhost/yiitest/’ , you should see like below.

Yii Create Success

Be Sociable, Share!
You can leave a response, or trackback from your own site.

Leave a Reply

CommentLuv badge
 

Powered by WordPress