CakePHP3 Multiple Application Tutorial : part 1

by , 2017/01/18

In this part of the tutorial we are going to be:

  1. Creating the directory that your application is going to reside in
  2. Cloning CakePHP3 App via git
  3. Understanding CakePHP3 constants
  4. Understanding composer

This tutorial is being developed under Ubuntu 16.04 64-bit, I expect this to work out of the box in any unix environment. I hope you have root permissions to the machine that you are going to be doing this tutorial on.


Creating the directory that your application is going to reside in

We are going to use the directory /var/www/cakephp-multi-app/ for our application. You can use what ever directory you wish. This detail only matters when we create our VHOSTs for your multiple application.


Cloning CakePHP3 App via git

We are going to use Cakephp 3.3.6 App Template

On your terminal

$ cd /var/www/cakephp-multi-app

$ git clone --branch 3.3.6 [email protected]:cakephp/app.git .
Read more

Cakephp3 Multiple Application Tutorial

by , 2017/01/06

This tutorial series explains how to create multiple web applications under one Cakephp3 framework.


Let's say you create a Content Management System (CMS) web application in Cakephp3, you will likely use the same Models to fetch data and present it. There is nothing wrong with this scenario, except that your CMS layer becomes strongly coupled to your data presentation layer. Over time as your application becomes more complex - you will eventually find it frustrating to maintain your code.

Possible Solution

Create Cakephp3 Plugins! Yes this will decouple your code. This solution is less complex than creating a multiple web application configuration.


When this tutorial series is complete you should have in your Cakephp3 application directory something like this


Read more