Setting Up a Local Dev Environment - sethfisher/Indypendent GitHub Wiki

Prerequisites:

  1. Signup for a free GitHub account.
  2. Download and install GitHub for Mac
  3. Download (but don't yet install) Acquia Dev Desktop (DAMP)

Once you have a GitHub account and have installed GitHub for Mac, do the following:

  1. Fork the Indypendent Repository to your GitHub account.
  2. Login to your GitHub account in GitHub for Mac.
  3. In the left panel, under the GitHub section, select your username.
  4. Click "Clone to Computer" in the main panel for the [username]/Indypendent repository.
  5. Clone As "Indypendent" in your Sites folder (/Users/[username]/Sites).

Now it's time to install and configure Acquia Dev Desktop (DAMP):

  1. Run the installation package and use all the defaults. What you enter for step 7 doesn't matter (as long as it validates); you'll be importing the site later on.
  2. In DAMP, go to Settings from the main screen. Go to the config tab, and select PHP 5.3.x as the Default PHP version.

Now import the site into DAMP:

  1. In DAMP, go to Settings and click the Sites tab.
  2. Select Import.
  3. For Site Path, choose the directory where you Cloned the Indypendent directory from GitHub (/Users/[username]/Sites/Indypendent).
  4. For Database, choose Create new database and name it indypendent.
  5. For Server, enter indypendent.local
  6. Click Import.

Next, configure drush and setup the drush aliases file:

  1. Open Terminal and open ~/.bash_profile vi ~/.bash_profile
  2. Add the following line to the file, then save it alias drush='/Applications/acquia-drupal/drush/drush'
  3. Reload .bash_profile source ~/.bash_profile
  4. Acquire the indypendent.aliases.drushrc.php file from Seth.
  5. Navigate to your home directory (/Users/[username] or ~ in Terminal) and create a .drush folder if it doesn't already exist. Place the aliases file in this directory.

Finally, import the database and files from the stage server via the drush command line utility:

  1. Open Terminal and paste/run the following: drush sql-sync @indypendent.stage @indypendent.local --structure-tables-key=common --target-dump --create-db --no-cache -v -y; drush @indypendent.local dis securepages, phplist, backup_migrate -y; drush @indypendent.local sqlsan -y; drush @indypendent.local cc all;
  2. In Terminal, paste/run the following (hit y and press Enter when prompted): drush rsync @indypendent.stage:%files @indypendent.local:%files -v