CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Moving working civicrm site to server
Pages: [1]

Author Topic: Moving working civicrm site to server  (Read 1715 times)

Wonder95

  • Guest
Moving working civicrm site to server
January 11, 2008, 02:35:16 pm
I am working on a Drupal 5.5/CiviCRM 1.9 site on my local machine, and I would like to move it to a web server.  Is there a prescribed method for doing this?  I have Drupal installed and running, and I've installed CiviCRM from scratch with the idea of just replacing the database with a dump from my existing CivicRM database on my local machine.  I've done it before, but whenever I try to import the .sql file, I get SQL errors about violating foreign key constraints.  Does CiviCRM have a mechanism for doing this?

Thanks.

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Moving working civicrm site to server
January 14, 2008, 12:57:39 am
Quote from: Wonder95 on January 11, 2008, 02:35:16 pm
I am working on a Drupal 5.5/CiviCRM 1.9 site on my local machine, and I would like to move it to a web server.  Is there a prescribed method for doing this?

Moving the files and the database(s) should generally work, provided you update the config files accordingly.

Quote from: Wonder95 on January 11, 2008, 02:35:16 pm
I have Drupal installed and running, and I've installed CiviCRM from scratch with the idea of just replacing the database with a dump from my existing CivicRM database on my local machine.  I've done it before, but whenever I try to import the .sql file, I get SQL errors about violating foreign key constraints.  Does CiviCRM have a mechanism for doing this?

How do you do your database dump? mysqldump always works for me (i.e., creates a conflict-less SQL dumps).
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

ryanpitt

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 0
Re: Moving working civicrm site to server
January 26, 2008, 06:08:25 am
Hi Wonder95,
Did you ever get this done?  I am trying to do the same thing, moving from an internal server to a hosted site.  I installed Drupal 5.3 (same version as in-house) and CiviCRM 1.9 (same version also) on the hosted site and I'm trying to get the data across.
Any tips?
Which are the config files that need to be edited once this is done?
Thanks for your help.
Ryan

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Moving working civicrm site to server
January 27, 2008, 05:41:03 pm
Assuming Drupal is working correctly on your new host... the basic steps are:

* Install a copy of the 1.9 codebase on your new host
* Copy the CiviCRM settings file (<drupal_root>/sites/default/civicrm.settings.php) from your test server to your new host
* Edit the $civicrm_root variable as needed to reflect the directory structure on the new host. Also edit both Drupal and CiviCRM DSN values as needed.
* Create an empty DB for CiviCRM on the new host (with DB name and credentials as entered in the settings file)
* Use mysqldump to dump your 1.9 (test) DB to a file
* Upload and load the dump file to your empty DB on the new host
* Clear out the DB stored configuration info in the new DB (since it contains paths and URLs from your test server)
Code: [Select]
UPDATE civicrm_domain SET config_backend = NULL WHERE id = 1;
If you're logged in to Drupal, log out and then log back in. You should be set.

Please confirm how these steps worked for you... since we probably need a section in the doc for this procedure :-)
Protect your investment in CiviCRM by  becoming a Member!

Wonder95

  • Guest
Re: Moving working civicrm site to server
January 28, 2008, 11:05:46 am
I got around it by adding SET FOREIGN_KEY_CHECKS = 0; at the beginning of the .sql file and SET FOREIGN_KEY_CHECKS = 1; at the end (as suggested at http://forum.civicrm.org/index.php/topic,1976.0.html).

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Moving working civicrm site to server

This forum was archived on 2017-11-26.