Project

General

Profile

DEPRECATED Creating a new site » History » Version 1

Benjamin Doherty, 10/04/2012 01:41 AM

1 1 Benjamin Doherty
h1. Cloning a new local site from live
2
3
First create databases on local environment.
4
5
<pre>
6
mysqladmin -u root create PROJECT_drupal
7
mysqladmin -u root create PROJECT_civicrm
8
</pre>
9
10
Then create your project Drupal root and install Drupal.
11
12
<pre>
13
cd ~/workspace/PROJECT
14
drush --yes site-install -y --db-url=mysql://root@localhost/PROJECT_drupal
15
</pre>
16
17
Create a Drupal alias of this project.
18
19
<pre>
20
cd sites/default
21
drush sa --with-optional --with-db --full --alias-name=@local @self >> ~/.drush/PROJECT.aliases.drushrc.php
22
</pre>
23
24
Log in to remote live host and create a new alias description for the live environment.
25
26
<pre>
27
cd PROJECT DRUPAL ROOT
28
cd sites/default
29
drush sa --with-optional --with-db --full --alias-name=@live @self
30
</pre>
31
32
Use these commands on localhost to synchronize.
33
34
<pre>
35
drush --yes sql-sync @PROJECT.live @PROJECT.local
36
drush --yes rsync @PROJECT.live:%files @PROJECT.local:%files
37
drush @PROJECT.live civicrm-sql-dump | drush @PROJECT.local civicrm-sql-cli
38
</pre>
Go to top