Separating CakePHP App from Core.
Why would I do that?
-Easy to upgrade
-Easy to deploy new apps
-App isolation from Core
These steps should be fairly straight forward and easy to follow. The way we set it up puts the core in the root, so this will be good for local installations on mac/linux. You can set it up for a shared environment, but I will leave that for another day.
Note: This is showing CakePHP 2.1.1 but the steps are the same for later versions.
Step 1 - Download core and place files in the proper folders.
Make the initial directories. The first is what we will connect our App’s to. The second will contain the core itself.
Step 3 - Configure the application to the core
This is clearly the most important step. Change the Keys and connect to the database. This is normal and won’t be covered. What is different is now we will link our App to our Core. Navigate to App/Webroot and open index.php Uncomment the following line:
We should be all configured and setup now to connect properly to our core. We can repeat this step as needed. You can also download this awesome start app which includes Twitter Bootstrap (a killer CSS library) and jQuery.
Click here to download the starter app.