| 1 | = CiviCRM HowTo Copy a Site |
| 2 | |
| 3 | Tags: [[CiviCRM Summary]] [[HowTo]] |
| 4 | |
| 5 | == Procedure |
| 6 | |
| 7 | 1. On the site you want to copy clear the CiviCRM cache by running the command: |
| 8 | - {{{http://{site domain}/index.php?q=civicrm/clearcache}}} |
| 9 | 2. Backup the CiviCRM and Drupal databases. |
| 10 | 3. Create the new databases and restore the backups to these databases. |
| 11 | 4. Ensure that the database user(s) have the correct permissions (see [[CiviCRM HowTo Install]]) |
| 12 | 5. Copy the directory of the original Drupal site to the new location. |
| 13 | 6. Change the ownership of the new site directory to `www-data` or the relevant user. |
| 14 | 7. In the new site directory, amend settings files `{Drupal Home}/sites/default/settings.php` and `{Drupal Home}/sites/default/civicrm.settings.php` to: |
| 15 | 1. Change the database connection details. |
| 16 | 2. Directories and URLs. |
| 17 | 8. Browse to the new site and go onto the CiviCRM tab / menu item. |
| 18 | 9. Go to `Administration\System Settings\Directories` and amend the custom directories. |
| 19 | |
| 20 | [[BackLinks]] |