Answers.Body: <p>The instructions here <a href="http://andrewmallis.com/blog/2009/06/02/how-to-back-up-databases-using-phpmyadmin" rel="nofollow noreferrer">how to back up databases using phpMyAdmin</a> used to work for me.  The author wrote:</p>
  
  <blockquote>
    <p>“Disable foreign key checks” isn’t always necessary. I do a lot of CiviCRM work. Restoring a CiviCRM database will fail unless this option is enabled in your export.</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-30T08:44:47.983Z
Answers.Text: The link you provided seemed to help — I was able to import my database without any errors. I still cannot get the core files to connect with the db.
Answers.UserDisplayName: Enrico Spada
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-22T21:14:21.060Z
Answers.LastActivityDate: 2017-03-22T21:14:21.060Z
Answers.UserDisplayName: George Lozier
Answers.Body: <p>In one instance when I hit this, it was a site that had been copied over but not fully configure and then ignored for a while, during which time the live site had an upgrade, and hence the code had changed. To bring it back to life I then did a git pull.</p>
  
  <p>I then started getting the above error. And finally clicked that I needed to run civicrm/upgrade.</p>
  
  <p>Just posting in case it helps others some head scratching. </p>
  
  <p>Have asked one of our team if we can get the error message modified to include the 'check if you need to run a database update' in case the helps too.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-27T23:39:32.413Z
Answers.LastActivityDate: 2017-04-27T23:39:32.413Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>I am having crazy trouble moving my CiviCRM/Wordpress installation from one server to another.</p>
  
  <p>I don't have many customizations, and we are a young organization, so I am OK with whatever solution gets my contacts and contributions to the new server, whether it's a complete copy or a fresh install and some sort of import. I think I would even be fine migrating to Drupal if it makes things easier (I have experience with Drupal sites as well), since that seems to be the most popular setup.</p>
  
  <p>I have followed the <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location" rel="nofollow noreferrer">instructions on the wiki</a>, and read a few dozen other articles and threads, but everything I find relates to Drupal and the steps don't seem to line up to Wordpress...something always goes wrong. </p>
  
  <p>I am able to get a new working copy of CiviCRM going but when I import my DB it breaks, and I get errors like this:</p>
  
  <blockquote>
    <p>Sorry but we are not able to provide this at the moment. DB
    Constraint Violation - dashboard_id should possibly be marked as
    mandatory for DashboardContact,get API. If so, please raise a bug
    report.</p>
  </blockquote>
  
  <p>I tried exporting using phpMyAdmin, including "disable foreign key constraint checks" and "Add drop table" and other combinations of options...nothing seems to work.</p>
  
  <p>I'm not sure what I'm doing wrong, and would appreciate a little hand.</p>
  
  <p>Some details:
   - My current install is at 4.7.7
   - CiviCRM shares a database with Wordpress</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-16T05:17:37.863Z
Comments.Text: Please give more details about how you're importing your records?  Also, you mention getting a "new working copy" of CiviCRM - this isn't typical.  Generally you'd create a blank database in MySQL and load in your old database dump.
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-16T19:25:23.373Z
Comments.Text: I actually export a .sql file using phpMyAdmin, then import it into the new database. The instructions in the wiki article above offer two routes: install a fresh copy of CiviCRM and importing your data, or export/import everything altogether. I've tried both ways with little luck. I can move my Wordpress website over no problem, and can install CiviCRM there. But importing my data breaks it. If I try the other route, I can access my site but not CiviCRM — I end up with blank screens.
Comments.UserDisplayName: Enrico Spada
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-16T21:37:09.070Z
Comments.Text: Did you give the new database the same name as the old? Did you update CiviCRM.settings.php to reference the new database name and password? In the past what I've done is moved the Wordpress install and database, then installed CiviCRM and referenced the new database. However, you do need to update the existing CiviCRM database files with the correct mySQL and server information.
Comments.UserDisplayName: Barbara Forbes-Lyons
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-17T03:02:26.503Z
Comments.Text: The database did not have the same name — but I did update CiviCRM.settings.php to reference the new db. Does it have to have the same name?
  
  Also, I had been importing the old database into the new installation -- but I will try your suggestion of using a second database and just changing the CiviCRM.settings.php credentials.
  
  When you say "update the existing CiviCRM database files" do you refer to CiviCRM.settings.php or other files that need updating?
Comments.UserDisplayName: Enrico Spada
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-30T08:42:43.483Z
Comments.Text: I know it's been a while, but still no luck here. I was able to import my DB without any errors, but when I update the CiviCRM.settings.php file with the new DB info, I lose access to the CiviCRM dashboard and pages. Are there other locations I need to populate the new DB information?
Comments.UserDisplayName: Enrico Spada
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-29T15:27:24.937Z
Comments.Text: @EnricoSpada - did you come right with this? I am also stuck with the exact same problem. I have read those instructions a thousand times and read many related articles.
Comments.UserDisplayName: SixfootJames
Tags: <wordpress><migration>
Title: Migrate Wordpress installation to new server
ThreadText: # Migrate Wordpress installation to new server
  
  (Asked by: username_0 on 2017-03-16)
  
  I am having crazy trouble moving my CiviCRM/Wordpress installation from one server to another.
  
  I don't have many customizations, and we are a young organization, so I am OK with whatever solution gets my contacts and contributions to the new server, whether it's a complete copy or a fresh install and some sort of import. I think I would even be fine migrating to Drupal if it makes things easier (I have experience with Drupal sites as well), since that seems to be the most popular setup.
  
  I have followed the [instructions on the wiki](https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location), and read a few dozen other articles and threads, but everything I find relates to Drupal and the steps don't seem to line up to Wordpress...something always goes wrong.
  
  I am able to get a new working copy of CiviCRM going but when I import my DB it breaks, and I get errors like this:
  
  > Sorry but we are not able to provide this at the moment. DB
  > Constraint Violation - dashboard\_id should possibly be marked as
  > mandatory for DashboardContact,get API. If so, please raise a bug
  > report.
  
  I tried exporting using phpMyAdmin, including "disable foreign key constraint checks" and "Add drop table" and other combinations of options...nothing seems to work.
  
  I'm not sure what I'm doing wrong, and would appreciate a little hand.
  
  Some details:
  - My current install is at 4.7.7
  - CiviCRM shares a database with Wordpress
  
  **Tags:** wordpress, migration
  
  > **Comments:**
  > **username_1**: Please give more details about how you're importing your records?  Also, you mention getting a "new working copy" of CiviCRM - this isn't typical.  Generally you'd create a blank database in MySQL and load in your old database dump.  
  > **username_0**: I actually export a .sql file using phpMyAdmin, then import it into the new database. The instructions in the wiki article above offer two routes: install a fresh copy of CiviCRM and importing your data, or export/import everything altogether. I've tried both ways with little luck. I can move my Wordpress website over no problem, and can install CiviCRM there. But importing my data breaks it. If I try the other route, I can access my site but not CiviCRM — I end up with blank screens.  
  > **username_2**: Did you give the new database the same name as the old? Did you update CiviCRM.settings.php to reference the new database name and password? In the past what I've done is moved the Wordpress install and database, then installed CiviCRM and referenced the new database. However, you do need to update the existing CiviCRM database files with the correct mySQL and server information.  
  > **username_0**: The database did not have the same name — but I did update CiviCRM.settings.php to reference the new db. Does it have to have the same name?  Also, I had been importing the old database into the new installation -- but I will try your suggestion of using a second database and just changing the CiviCRM.settings.php credentials.  When you say "update the existing CiviCRM database files" do you refer to CiviCRM.settings.php or other files that need updating?  
  > **username_0**: I know it's been a while, but still no luck here. I was able to import my DB without any errors, but when I update the CiviCRM.settings.php file with the new DB info, I lose access to the CiviCRM dashboard and pages. Are there other locations I need to populate the new DB information?  
  > **username_3**: @EnricoSpada - did you come right with this? I am also stuck with the exact same problem. I have read those instructions a thousand times and read many related articles.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_4 on 2017-03-22. Score: 1
  
  The instructions here [how to back up databases using phpMyAdmin](http://andrewmallis.com/blog/2009/06/02/how-to-back-up-databases-using-phpmyadmin) used to work for me. The author wrote:
  
  > “Disable foreign key checks” isn’t always necessary. I do a lot of CiviCRM work. Restoring a CiviCRM database will fail unless this option is enabled in your export.
  
  > **Comments:**
  > **username_0**: The link you provided seemed to help — I was able to import my database without any errors. I still cannot get the core files to connect with the db.  
  
  ---
  
  ### Answer by username_5 on 2017-04-27. Score: 0
  
  In one instance when I hit this, it was a site that had been copied over but not fully configure and then ignored for a while, during which time the live site had an upgrade, and hence the code had changed. To bring it back to life I then did a git pull.
  
  I then started getting the above error. And finally clicked that I needed to run civicrm/upgrade.
  
  Just posting in case it helps others some head scratching.
  
  Have asked one of our team if we can get the error message modified to include the 'check if you need to run a database update' in case the helps too.
  
  
  ---
  
  