Created
February 20, 2017 18:26
-
-
Save ogomez78/3b5fbfa27ad8cd3d0fc6947477b1c862 to your computer and use it in GitHub Desktop.
DigitalOcean Drupal/CiviCRM Droplet cloning
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Ubuntu 14.04 | |
| Drupal 7 | |
| CiviCRM 4.7 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use these steps to clone live sites into dev enviroments, for example.
Tested for:
Ubuntu 14.04
Drupal 7
CiviCRM 4.7
Create a snapshot of the droplet, and from that snapshot, create a new droplet
disable outgoing emails, to prevent automated workflows from sending emails from this dev server.
sudo nano /etc/postfix/main.cfadd this line at the bottom of the file:
default_transport = error:No outside emails.Create a copy and then edit the Drupal nginx config file to update server_name and set server to listen to port 80 instead 0f 443, and remove redirects (assuming the live site was set up to force SSL).
ssh mysudoeruser@myipaddresscd /etc/nginx/sites-enabledscp drupal /home/mysudoeruser/drupal.txtsudo nano drupalmake sure the new nginx config file works properly by testing it
sudo service nginx configtestRestart Nginx service
sudo service nginx restartEdit settings.php to update the base_url variable with the IP address of the droplet you're setting up.
sudo nano <drupal-root>/sites/default/settings.phpEdit civicrm.settings.php to update the CIVICRM_UF_BASEURL variable with the new URL, like the to do above, but with an ending /.
sudo nano <drupal-root>/sites/default/civicrm.settings.phpRemove all files from the templates_c directory
sudo rm -r <drupal-root>/sites/default/files/civicrm/templates_c/*Ensure this templates_c directory permissions allow for the application to add files to it.
sudo chown -R www-data:www-data <drupal-root>/sites/default/files/civicrm/templates_cRemove the Config.IDS.ini file
sudo rm <drupal-root>/sites/default/files/civicrm/ConfigAndLog/Config.IDS.iniClear Drupal Cache
cd <drupal-root>sudo drush cc allLog into the site, /user, and disable CiviCRM's force SSL setting at civicrm/admin/setting/url?reset=1
Disable CiviCRM's crob, to avoid scheduled reminders other automated tasks from running.
sudo -u www-data crontab -e