CakePHP: Central cake core install with multiple apps


When developing on my system I like to use only one version of the core files. If I update the core files from svn it gets updated for all apps I’m working on.
The way I’m using this is explained below:

In my web-root I do an svn export of cake latest:
cd /Users/mwesten/Sites
svn export https://svn.cakephp.org/repo/branches/1.2.x.x/ cake1.2.x.x

Now we have the latest core files on our system.

If I like to create an app I’ll do the following:
cp -R /Users/mwesten/Sites/cake1.2.x.x/app /Users/mwesten/Sites/dev/myapp

Then I change the following file to point to the correct core files:
mate /Users/mwesten/Sites/dev/myapp/webroot/index.php
Then add the line
define('CAKE_CORE_INCLUDE_PATH', '/Users/mwesten/Sites/cake1.2.x.x');
before the part saying:
/**
* Do not change
*/

If you go to the page http://localhost/dev/myapp/ it then shows the cakephp welcome page.

Information and Links

Join the fray by commenting, tracking what others have to say, or linking to it from your blog.


Other Posts
CakePHP: Calling bake from every dev-app install folder
CakePHP on OSX: Problem using Bake.php script

Write a Comment

Take a moment to comment and tell us what you think. Some basic HTML is allowed for formatting.

Reader Comments

[...] you use a setup like I explained in my previous post calling the bake script involves a lot of typing with the core and app parameter [...]

This is great man! Thanks a lot!

Thanks for this, much better than the copies I had lying all over my hard drive.
I’m using 1.2 now and need to get versions fairly regularly.