Getting Started with CakePHP 3



This information is referenced from the official CakePHP book. For more information about the installation and usage of CakePHP 3, please visit the CakePHP 3 Book at:


Make a new workspace, choose PHP, go to the Terminal, and execute the following:

echo "updating composer" && \
curl -sS | php
echo "creating CakePHP project";
php composer.phar create-project cakephp/app name_of_project;
cd $1;
chmod +x bin/cake;

After downloading CakePHP 3, you will need to change the Apache DocumentRoot and point it at your freshly created project folder. Apache mod_rewrite will take care of the rest.

Now you are free to create your database and add the connection information to {PROJECT_ROOT}/config/app.php

Running the CakePHP Server

While you may choose to run your app with Apache, you can also run it with the built-in CakePHP server. In order to do this you’ll first need to stop Apache to make sure there’s no port conflict.

If you ran Apache with the Run button, you can stop it by closing out of tab with the running process in it. You can also stop Apache from the terminal by running sudo service apache2 stop.

From there, run your CakePHP server with the following command:

bin/cake server -H $IP -p $PORT

Tutorials - Table of Contents
How can I use cakephp server on c9?

We’ve written a tool to facilitate new users installing CakePHP, check for 1 click install

Also we’ve added a tutorial about upgrading workspace to PHP7 to allow latest version of the framework be installed.