Project

General

Profile

Actions

DEPRECATED!

Cloning a new local site from live

First create databases on local environment.

mysqladmin -u root create PROJECT_drupal
mysqladmin -u root create PROJECT_civicrm

Then create your project Drupal root and install Drupal.

cd ~/workspace/PROJECT
drush --yes site-install -y --db-url=mysql://root@localhost/PROJECT_drupal

Create a Drupal alias of this project.

cd sites/default
drush sa --with-optional --with-db --full --alias-name=@local @self >> ~/.drush/PROJECT.aliases.drushrc.php

Log in to remote live host and create a new alias description for the live environment.

cd PROJECT DRUPAL ROOT
cd sites/default
drush sa --with-optional --with-db --full --alias-name=@live @self

Use these commands on localhost to synchronize.

drush --yes sql-sync @PROJECT.live @PROJECT.local
drush --yes rsync @PROJECT.live:%files @PROJECT.local:%files
drush @PROJECT.live civicrm-sql-dump | drush @PROJECT.local civicrm-sql-cli

Updated by Jack Aponte over 6 years ago · 2 revisions

Also available in: PDF HTML TXT

Go to top