Installing cakePHP on Wamp server

1.Download cakePHP package from

2.Create a database on your wamp server.

3.Now go to cakefolder_you_downloaded/app/config folder

a)Open the file database.php.default

b)Change the name to database.php(remove .default from name)

c)Add your database details to this file like mine are

public $default = array(

‘datasource’ => ‘Database/Mysql’,

           ‘persistent’ => false,
‘host’ => ‘localhost’,
‘login’ => ‘root’,
‘password’ => ”,
‘database’ => ‘worldwidestone’,
‘prefix’ => ”,
//’encoding’ => ‘utf8’,

4)Now open file core.php

a) Change this line

Configure::write(‘Security.salt’, ‘DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi’);

add some random string of ints and character (type whatever from keyboard)

b)Change this line too

Configure::write(‘Security.cipherSeed’, ‘76859309657453542496749683645’);

add some random integer string

5)Now open the route.php file(cakefolder_you_downloaded)

a)change the path to your project like mine is

Router::connect(‘/’, array(‘controller’ => ‘yours’, ‘action’ => ‘index’));

6.Now create a file and add the following code
Class YouresController extends AppController
function index()

save it in app/controller as YoursController.php

7. Create another file and add the following code
Class Your extends AppModel

var $name=”Your”;

save it in app/model as Your.php

8.Create a folder in app/view/Yours
Yours is name of folder.

9.Create a file and add following code
<?php echo “Hello”; ?>
and save as index.ctp in app/view/Your/index.php
10.You must have a table named Yours in database.
11.Now run and you can see Hello.


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 )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s