Migrating to a new domain and/or web host

CiviCRMI often develop CiviCRM on its own subdomain (e.g. crm.mydomain.com) before going live. At which point the site will have a new domain and database. This article describes the relatively complex routine.


Akeeba backup

Start by backing up your existing site using Akeeba Backup.

  1. Go to Components > Akeeba Backup.
  2. In the Include and Exclude Information section click the Database Tables Exclusion button.
  3. For the following tables, select the 'Do note backup' option.
    1. civicrm_acl_cache
    2. civicrm_acl_contact_cache
    3. civicrm_group_contact_cache
  4. Go back to the Akeeba Backup Control Panel
  5. Click Backup Now.
  6. Enter a meaningful Description.
  7. Click Backup Now.

 

Restore to new site

Access the root directory of your new site.

  1. Use KickStart to restore from your backup just created.
  2. Run the restoration Wizard in the usual way, but with the following considerations.
  3. Live site URL: Enter the new URL (e.g. https://yourdomain.com).
  4. Do not Replace main .htaccess file with default

 

Manual configurations

Before you try to logon, you’ll need to make some manual changes to some CiviCRM configuration files

Open the following files for editing:

  • components/com_civicrm/civicrm.settings.php
  • administrator/components/com_civicrm/civicrm.settings.php
  • administrator/components/com_civicrm/civicrm/civicrm.config.php

Make the following changes:

  • Change all URLs that will be pointing to your old web address.
  • Change all database connection details.
  • Change all file paths.

If you are migrating to your main www domain, you might find that you now need to redirect WWW traffic.

 

Resource URLs

Now you can log on to the backend. Note that the CiviCRM navigation menu will be lower-left until you make the following changes.

  1. Go to Components > CiviCRM.
  2. Go to Administer > System Settings > Resource URLs.
  3. Change all URLs to match your new site.

 

Cron Job

As you are likely on a new server, you will need to reconfigure your Cron Job, so that it points to the new file path.

 

Thanks for visiting.