Setting up CakePHP with MAMP Pro on Mac OSX

Posted April 11th, 2011 • 2 min read

I'd like to use my first post to describe how I set up new projects in a simple way that works best for me. My setup is pretty straight-forward, really. I know some people who mess about with include-paths so they can run multiple apps on one cake-install, but since I work for various clients and even more various projects I like my project folders to be self-contained.

Downloading CakePHP

Easy enough. Grab a fresh copy of CakePHP @ Github

Unzip the package and copy the extracted folder to your Sites directory (mine is in /Users/Hyra/Sites) and rename the folder to the project you want to work on. For example: www.fantasticnewsite.org

Setting up CakePHP

I won't go through the all of the options as it's perfectly documented here at the CakePHP Book but what I usually do is the following:

  1. Rename /app/config/database.php.default to /app/config/database.php and fill in the database credentials in $default
  2. Open up the Terminal and run (for example): chmod 777 ~/Sites/www.fantasticnewsite.org/app/tmp
  3. Open up /app/config/core.php and change the values for: Security.salt Security.cipherSeed

That's it really. Of course, there's a bunch of extra stuff you can set up, but that's all outlined here if you want to read up on it.

Setting up MAMP Pro

Optional. If you have any form of *AMP setup already running, by all means, skip this step. I just happen to run MAMP Pro for ease and comfort.

Open up MAMP Pro and go to the Hosts tab and simply:

  1. Hit the plus-sign
  2. Give the site a name at which you want to access it locally
  3. Browse to the location you want the site to be located
  4. Hit apply

By this point you should be able to point your favourite browser to your fresh local domain at http://www.fantasticnewsite.org

Stay up to date

Want to know when a new post comes out and stay in the loop on tips, tricks and gotchas? Consider signing up for the Mindthecode newsletter.

Comments

Keep reading

May 22nd, 2011 • 4 min read
The following setup can work nicely when you develop your sites locally and don't want to change the configuration every time you upload it.
May 26th, 2011 • 1 min read
In this short post I will show you how to get rid of a Git submodule
April 20th, 2016 • 8 min read
Inside React Native you can use the PanResponder to recognise multi-touch gestures as well as swipes and other touches that make native apps feel snappy and intuitive. But getting it up and running can feel daunting and borderline black magic. In this post I'll try and guide you through the process, hopefully demystifying it a bit and get you on track to awesomeness.