Yii 1.1: Install, update and use Yii with WAMP server

5 followers

Here I am describing how you can install and update Yii in WAMP sever.

Follow the following step by step procedures to find your destination-

Step 1: Assigning PHP engine location path in system variable

  • Go to “My Computer” ->Right click and select "Properties"
  • Click "Advanced system settings" from left pane
  • Under "Advanced" tab click on "Environment Variables"
  • Under "System variables" scroll down and find text "Path" then Double click on it
  • Now enter your PHP engine location on end of the "variable value" field

    i.e. for me I entered "C:\wamp\bin\php\php5.3.10". Just enter location without double quotes

  • Click ok and finally exit from this.

Step 2: Create project folder under "www"

Just create a blank folder in "www" that should be your project name. i.e "bid" You can also make this using command window. For this-

  • Open command window
  • C:>cd wamp\www\
  • C:\wamp\www>mkdir bid

Step 3: Download Yii framework and put into www directory and install the framework for bid project

  • Go "http://www.yiiframework.com/" and download latest Yii framework zipped file
  • Unzip and rename folder to "yii"
  • Using command-

    • C:\wamp\www>cd yii\framework\
    • C:\wamp\www\yii\framework>yiic webapp C:\wamp\www\bid

      Create a Web application under ‘C:\wamp\www\bid’? [Yes|No] y

      Your application has been created successfully under C:\wamp\www\bid.

Now you are ready to browse your project by accessing the URL : http://localhost/bid/

If you want to use this installation for multiple project then just copy "bid" folder and past and rename with your project name. Its better if you make "bid" folder as your backup project folder then when you need to work with a new project then just you need to copy and past this folder and rename to your new project name.

If you want to install an updated version of Yii framework then please download updated version zipped folder from "http://www.yiiframework.com/" and unzip. After unzip the file just copy the framework folder and then go "yii" folder under "www" directory and just replace previous framework folder with latest one.

Enjoy and explore Yii...........

Total 5 comments

#13482 report it
Yii Developer India at 2013/05/31 05:12am
Installation process of Yii 2.0 in wamp

Can you please let me know what is process to install yii 2.0 in wamp

Thanks

#10828 report it
mrs at 2012/11/26 12:59pm
Thanks HelixNebula

Its nice because your nice explanation will help beginner a lot. Always, a good explanation help to summarize things easily.

With Thanks,

mrs

#10824 report it
HelixNebula at 2012/11/26 10:16am
Example : Windows 7 and WampServer

I downloaded yii-1.1.12.b600af.zip and it contained a yii-1.1.12.b600af/ folder, containing:
- demos/ (demos)
- framework/ (framework source files)
- requirements/ (requirement checker)
- CHANGELOG (describing changes in every Yii release)
- LICENSE (license of Yii)
- README (instructions)
- UPGRADE (upgrading instructions)

I created a folder yii/ in my Wamp folder ( C:\wamp\yii ) so that it was outside the 'webroot' ( C:\wamp\www ).
I unzipped the download here, ending up with C:\wamp\yii\yii-1.1.12.b600af\framework etc.
I moved the requirements/ and demos/ folders into 'webroot' - i.e. C:\wamp\www\requirements
The requirements test ran fine as localhost/requirements/index.php

For the demo Hangman game to work ( localhost/demos/hangman/index.php ) I had to edit index.php :

$yii=dirname(__FILE__).'/../../../yii/yii-1.1.12.b600af/framework/yii.php';

I then added the following onto the end of my existing 'path' environment variable, so that yiic commands will work in a command window - successfully finding php and the yiic utility :
C:\wamp\bin\php\php5.3.13\;C:\wamp\yii\yii-1.1.12.b600af\framework

#10602 report it
mrs at 2012/11/06 04:46pm
Thanks to SomethingWicked for valuable suggestions

Your suggestions is great. I think Yii beginner should upgrade their settings to a little bit advanced format like yours. I hope they will do that after playing few days with great Yii or they can also start from very beginning with advanced settings if they feel everything is OK.

With thanks,

mrs

#10464 report it
SomethingWicked at 2012/10/30 06:37am
Simple approach with possible improvements

Hello, thanks for the brief wiki. I understand that the purpose of this guide is a basic set-up, but I suggest some little more improvements to the environment.

  • put the framework outside of the www directory
  • do not replace the yii framework if updating, but add the new version not changing the name of the dir, so multiple version of the fw can cohexist without problems (ie yii-1.1.8.r3324, yii-1.1.9.r3527 and so on inside a directory named "yii-frameworks" or something like that)
  • add a virtual host in apache-conf/extra/httpd-vhosts.conf for every project, in order to be able to visit the project from the browser as a second/third level domain (ie dev.example.com or slt).

This is partly how I set up my environment, all imho :)

Regards!

Leave a comment

Please to leave your comment.