Installing Yii 2.0 from an archive file


I am new to yii especially 2.0. I try to install it, according to installation steps:


Installing from an Archive File

Installing Yii from an archive file involves three steps:

1, Download the archive file from

2, Unpack the downloaded file to a Web-accessible folder.

3, Modify the config/web.php file by entering a secret key for the cookieValidationKey configuration item (this is done automatically if you are installing Yii using Composer):

// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation

‘cookieValidationKey’ => ‘enter your secret key here’,

However they are not as clear as they look like in respect to step 3.

I have couple of questions:

1, what is the location of the config/web.php?

2, Or did you mean main.php file in root: …wamp\www\advanced\common\config\main.php?

3, or any other folder in which the file has to be created…

the other part shall i insert onto the file:

‘components’ => [

'request' => [


	'enableCookieValidation' => true,


	'enableCsrfValidation' => true,


	'cookieValidationKey' => 'YOUR SECRET KEY HERE!!!',



Or shall I insert only ‘cookieValidationKey’ => ‘YOUR SECRET KEY HERE!!!’ - Exactly Where???

Thanks for help

Old post, but I will provide an answer for the thread. In the Basic application template, web.php is the equivalent to the main.php file for common/, backend/, and frontend. You can add those lines to the components block in advanced\common\config\main.php. The main.php for frontend/ and backend/ load the configuration files from common/.