// you’re reading...

PHP Related Links

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.

Tags: , , ,

Discussion

Comments are disallowed for this post.

  1. [...] 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 [...]

    Posted by CakePHP: Calling bake from every dev-app install folder at DLMax | May 8, 2007, 9:35 pm
  2. This is great man! Thanks a lot!

    Posted by Ryan | May 9, 2007, 4:47 pm
  3. 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.

    Posted by scoby | September 26, 2007, 1:23 pm
  4. nice piece of info, tx alot. now i just need to find out how to share a webroot folder to:)

    Posted by jarrett jordaan | November 14, 2008, 2:21 pm