Skip to content

How to Migrate CiviCRM to another Server

This is tutorial based on my experience moving CiviCRM installation from a server to another server. This is assume you already installed CiviCRM on top of Drupal. Here you go…

#1 Backup and Restore Database and System Files

  1. Backup all the script (all system files) which is located on htdocs/ directory
  2. Backup drupal and civicrm database
  3. Restore database drupal and civicrm to another destination server.
  4. Copy / move all the script / system files to destination server htdocs directory.


#2 Configuring Settings File

  1. Configure the setting file in /parentdirectory/sites/default directory. There are 2 files : civicrm.settings.php and settings.php. Change the database and site url at those 2 files.
  2. Delete all files and folder on template_c directory :

rm -r /opt/lampp/htdocs/yoursite/sites/default/files/civicrm/templates_c/*


#3 Copy Fresh Extension to Extension Directory

  1. Delete all files and folder on extension directory
  2. Copy desired extension to extension directory


#4 Changing Permission

  • Change permission of template_c directory :

chmod 777 /opt/lampp/htdocs/yoursite/sites/default/files/civicrm/templates_c/

chmod 777 /opt/lampp/htdocs/yoursite/sites/default/files/civicrm/templates_c/*


  • Change permission of upload directory :

chmod 777 /opt/lampp/htdocs/yoursite/sites/default/files/civicrm/upload/

chmod 777 /opt/lampp/htdocs/yoursite/sites/default/files/civicrm/upload/*


  • Change permission of contribute directory :

chmod 777 /opt/lampp/htdocs/yoursite/sites/default/files/civicrm/persist/contribute/

chmod 777 /opt/lampp/htdocs/yoursite/sites/default/files/civicrm/persist/contribute/*


  • Change permission of custom directory :

chmod 777 /opt/lampp/htdocs/yoursite/sites/default/files/civicrm/custom/

chmod 777 /opt/lampp/htdocs/yoursite/sites/default/files/civicrm/custom/*


Change permission of extension directory :

chmod 777 /opt/lampp/htdocs/yoursite/sites/extension/

chmod 777 /opt/lampp/htdocs/yoursite/sites/extension/*


#5 Configuring Directory on MRM

  • Go to administer -> System Settings -> Directories. Change the Extension Directory field to : /opt/lampp/htdocs/yoursite/sites/extension
  • Go to administer -> System Settings -> Resource URLs. Change the Extension Resource URL to : http://yoursiteurl/sites/extension


Image Source :
Published inTutorial

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *