** Get the latest Craft download from: Build With Craft**
** Having the /craft/app folder in source control is a personal decision, but you want the most recent version, regardless. Pixel & Tonic's Craft CMS license indicates that no one besides P&T is allowed to redistribute the /craft/app
folder. Tread lightly.**
** Please create an issue if you run into a problem. I want this to help not hinder. It is a bit of a learning experiment for me, I could be wrong in an implementation or setting. I can't fix it if you don't let me know.
- First create local database (phyMyAdmin or Sequel Pro are your friends)
- Rename db.example.php -> db.php and general.example.php -> general.php files within /craft/config/local/
db.php
// Local database info
return array(
'server' => 'localhost',
'user' => 'username',
'password' => 'password',
'database' => 'local-db-name'
);
general.php
/*
* Local Config Override
*
* Overrides added here will get appended to the end of the
* custom config array for all environments: '*'
*/
return array(
// Give us more useful error messages
'devMode' => true,
// Route ALL of the emails that Craft
// sends to a single email address.
'testToEmailAddress' => 'testingemail@example.com',
'translationDebugOutput' => false,
'useCompressedJs' => true,
'cacheDuration' => 'P1D',
'cooldownDuration' => 'PT5M',
'maxInvalidLogins' => 5,
'invalidLoginWindowDuration' => 'PT1H',
'phpMaxMemoryLimit' => '256M',
// Member login info duration
// http://www.php.net/manual/en/dateinterval.construct.php
'userSessionDuration' => 'P101Y',
'rememberedUserSessionDuration' => 'P101Y',
'rememberUsernameDuration' => 'P101Y',
);
Now that you've put the correct database credentials in db.php, head on over to /admin and if all is well will start the installation process. Running with MAMP is fairly easy and it comes with phpMyAdmin.
If you don't already have Node installed head over to http://nodejs.org/download/ via the command line or install with homebrew (Mac OS):
- Install gulp (-g means global):
npm install -g gulp
- Install gulp modules defined in package.json:
npm install
- Check for outdated packages
npm outdated
- Gulp away by running:
gulp
- ^ to run default tasks array or to just watch for new changes:
gulp watch
Using Mamp, I recommend running it on craft.dev for local settings to work. You can update your /etc/hosts file to have:
127.0.0.1 craft.dev
then run on craft.dev:8888 (if using MAMP 8888 will work if that's how you set up your Apache Port) Feel free to modify the .scss-lint.yml file to match your preferences on how to lint your scss files.
I setup the templates to have global fields required for Meta Information (metaInformation.metaDescription and metaInformation.metaPageTitle). This is for SEO. The two variables are set at the top of main_layout.html. Take 'em out if you don't need a default global SEO and the ability to then override in sub-pages.
The default .htaccess is packed with a bunch of goodies, modify as you see fit. Just make sure to add a period before the file name to make sure its read properly.
The default .gitignore file is setup to not track unecessary folders and files, most of it involves ignoring config files, as well as node_modules and other assorted craft/app and craft/storage folders and files.