Multi-site CakePHP configuration for Mac

by Michael Birch

This is the CakePHP configuration I use for development websites on my MacBook Pro.

My project structure for CakePHP is to move the webroot directory out of the app and rename it “public” which is the webroot for Apache on my production web server. I also move the Cake directory to /Users/mike/Sites/cake/<version_number>/ so that can be used by multiple websites.

Directory structure



<?php if (!defined('ROOT')) {
  define('ROOT', DS.'Users'.DS.'mike'.DS.'Sites'.DS.'<project_name>');

if (!defined('APP_DIR')) {
  define('APP_DIR', 'app');

define('CAKE_CORE_INCLUDE_PATH', DS.'users'.DS.'mike'.DS.'Sites'.DS.'cake'.DS.'2.4.0'); ?>
blog comments powered by Disqus