Ketan Patel

How to install CakePHP on localhost Wamp

In this post we will learn how to install & configure the CakePHP on localhost Wamp. I am using  Wamp Server as the web server but, it will remain same in XAMPP & many other Apache Based web servers as well because all those are build based on apache core. So, the configurations are mostly same as Wamp Server.

How to install CakePHP on localhost Wamp

So what you need to do is just follow the steps given below in order to install CakePHP on localhost.

Step 1 : Go to CakePHP Official Website and download the latest version of CakePHP and unzip the file.

Step 2 : Copy the downloaded folder in wamp www folder : C->wamp->www->(cakefolder)

Step 3 : Now Go to (cakefolder)->app->Config->database.php.default and rename it as database.php. Now you need to make required changes in it. After the changes, the configuration setting look like bellow.

    public $default = array(         'datasource' => 'Database/Mysql',         'persistent' => false,         'host' => 'localhost',         'login' => 'root',         'password' => '123456',         'database' => 'cakephp_project',         'prefix' => '',         //'encoding' => 'utf8',     );     public $test = array(         'datasource' => 'Database/Mysql',         'persistent' => false,         'host' => 'localhost',         'login' => 'root',         'password' => '',         'database' => 'cake_test',         'prefix' => '',         //'encoding' => 'utf8',     ); }

Step 4 :  Open (cakefoler)->app->Config->core.php and change the values of the Security.salt and Security.cipherSeed.

Default they were like,

Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
Configure::write('Security.cipherSeed', '76859309657453542496749683645');

You can change the code as per your preference. In this case i am changing the code as bellow & save.

Configure::write('Security.salt', 'gk5454545fsdfUEsdfsbDsdh');
Configure::write('Security.cipherSeed', '54548785454521');

Step 5 :  Make sure the (cakefolder)->tmp is writable and apache mod_rewrite is enabled.

Step 6 : Open the browser and type : http://localhost/(cakefolder)/ and that's up.You're Done..!

If you received above page that means you have install & configure the CakePHP framework perfectly. Development on CakePHP Framework can be start now. Good luck with CakePHP.


In case if you don’t get the result as above that means you are having issue with mod_rewrite. You will face the error of  "URL rewriting is not properly configured on your server."

To overcome this issue, follow the steps given here URL Rewriting is not Properly Configured on Your Server.  

Ketan Patel

About Ketan Patel -

I have developed a wide range of websites using CorePHP, Opencart, CakePHP and CodeIgniter including sites for startup companies and small businesses. Apart from my blogging life, I like to read Novels, Listening music and Net surfing.

Subscribe to this Blog via Email :