You are here

22 July 2010
This tutorial shows how to install CakePHP. After this tutorial you can start making web application.
Installing CakePHP is simple. Copy the files, set up database and change some permissions and parameters.

Get CakePHP:

Get CakePHP from cakephp.org.

Upload CakePHP:

Unpack the archive you downloaded to your domain, sub-domain or localhost. That is the root folder of your project. This is what is in my root directory:
Source code viewer
  1. /app/
  2. /cake/
  3. /plugins/
  4. /vendors/
  5. /README
  6. /index.php
Programming Language: Bash

Permissions:

Make /app/tmp/ directory writable(777), by using recursive method, meaning that everything in that directory is writable.

Database:

Set your database settings, the location from where you can find the file:
Source code viewer
  1. /app/config/database.php.default
Programming Language: Bash
After putting your database details there you have to rename the file to database.php. Some people make copy of the file to keep the default, but no point to do that.

Sequrity:

Open core.php from configuration folder and change values of Security.salt and Security.cipherSeed. Make sure that those values will not be easily guessable.

.htaccess

Make a file to root directory and call it .htaccess. Contents of that file should be:
Source code viewer
  1. <IfModule mod_rewrite.c>
  2. RewriteEngine on
  3. RewriteRule ^$ app/webroot/ [L]
  4. RewriteRule (.*) app/webroot/$1 [L]
  5. </IfModule>
Programming Language: XML
Now you can start learning to write your own application. If you are totally new to frameworks then I suggest to look for tutorials. I've learned CodeIgniter already and I'm going to write my application directly. First I am going to read some documentation to familiarize myself with structure of CakePHP and then I am going to write my application.