Project

General

Profile

DEPRECATED Creating a new site » History » Version 2

Jack Aponte, 03/29/2016 12:56 AM

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