Setting Up a Local Dev Environment - sethfisher/Indypendent GitHub Wiki
Prerequisites:
- Signup for a free GitHub account.
- Download and install GitHub for Mac
- 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:
- Fork the Indypendent Repository to your GitHub account.
- Login to your GitHub account in GitHub for Mac.
- In the left panel, under the GitHub section, select your username.
- Click "Clone to Computer" in the main panel for the [username]/Indypendent repository.
- Clone As "Indypendent" in your Sites folder (/Users/[username]/Sites).
Now it's time to install and configure Acquia Dev Desktop (DAMP):
- 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.
- 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:
- In DAMP, go to Settings and click the Sites tab.
- Select Import.
- For Site Path, choose the directory where you Cloned the Indypendent directory from GitHub (/Users/[username]/Sites/Indypendent).
- For Database, choose Create new database and name it indypendent.
- For Server, enter indypendent.local
- Click Import.
Next, configure drush and setup the drush aliases file:
- Open Terminal and open ~/.bash_profile
vi ~/.bash_profile
- Add the following line to the file, then save it
alias drush='/Applications/acquia-drupal/drush/drush'
- Reload .bash_profile
source ~/.bash_profile
- Acquire the indypendent.aliases.drushrc.php file from Seth.
- 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:
- 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;
- In Terminal, paste/run the following (hit y and press Enter when prompted):
drush rsync @indypendent.stage:%files @indypendent.local:%files -v