This documentation relates to CiviCRM version 3.2. It's not maintained anymore.
Current version of documentation.

Change CiviCRM domain_id

Skip to end of metadata
Go to start of metadata

This page refers to outdated version of CiviCRM. Check current version of documentation.


Documentation Search


CiviCRM 3.2 Documentation

Support and Participation

Developer Resources


CiviCRM book!

Make sure to check out Understanding CiviCRM as well! You can also support this project by ordering a hard copy.

The following MySQL script allows you to change the domain_id of your CiviCRM installation.  This can become necessary when hosting multiple CiviCRM installations on the same server.

 1. Save the following script to your database server, naming it update_domainid.mysql.  Modify the two SELECT statements to be appropriate for your needs.  Set @old_domain_id to the current domain_id in your database.  Set @new_domain_id to what you wish to change this domain_id to. 

Or, for CiviCRM 1.7....

 2. Execute the script to update your CiviCRM database.  For example:

 3. Modify the CIVICRM_DOMAIN_ID setting in your civicrm.settings.php file to match the @new_domain_id you set above.

Labels
  • None

Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.