Answers.Body: <p>I've done WP-to-Drupal (and many other CMS migrations) with Civi, and I don't think that note is accurate.</p>
  <p>I believe it should say, &quot;Make sure the administrator account you're logged in to WP with at the time of migration has an email that matches an administrator account in Drupal.&quot;</p>
  <p>There's a CiviCRM table <code>civicrm_uf_match</code>, which links CiviCRM contacts (in <code>civicrm_contact</code>) with the CMS users.  When migrating, you should remove all entries except for the administrator user you're using in that moment.</p>
  <p>With regard to installing CiviCRM on WordPress - it doesn't really matter, as soon as you complete the installation you'll import your current database.</p>
  <p>Note that when a WP user visits CiviCRM for the first time, Civi will check the user's email against the existing contacts in Civi and link the account to a contact record.  That's why clearing out <code>civicrm_uf_match</code> is a good choice, it will be regenerated as folks log in.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-11T21:26:05.393Z
Answers.Text: I'll check the version control history to see who added that note and confer with them.  I suspect they mean the same thing I said here but the wording is ambiguous.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-11T23:29:48.287Z
Answers.Text: Thank you, Jon M. That's very helpful. The one thing that's a bit odd is that the database restoration/import will happen via phpMyAdmin so there will not necessarily be anyone logged into WordPress when the database restoration happens. It sounds like maybe the three things to do are: 1) Make sure that an admin exists in WordPress that matches an admin in the source data, 2) clear out the civiccrm_uf_match table data except for the this admin user, and 3) once the data have been restored then run a "synchronize accounts" before doing anything else.
Answers.UserDisplayName: Bruce Hooke
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-11T21:25:36.317Z
Answers.LastActivityDate: 2022-03-11T21:25:36.317Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I am working on migrating a CiviCRM database from Drupal to WordPress. Right now I'm working on a development site in WordPress so I at this stage I am trying to test everything out in preparation for the real migration down the road. I am using this guide: <a href="https://docs.civicrm.org/sysadmin/en/latest/misc/switching-cms/drupal-to-wordpress/" rel="nofollow noreferrer">https://docs.civicrm.org/sysadmin/en/latest/misc/switching-cms/drupal-to-wordpress/</a></p>
  <p>I have a couple of questions about this tip:</p>
  <blockquote>
  <p>When you set up WordPress, make sure you use the same Administrator account name as the Drupal Administrator account. Otherwise, you might encounter DB errors and/or Foreign Constraint issues due to the WordPress account not being associated with the CRM Accounts. If you have no choice, make sure you synchronize your accounts prior to trying to edit anything else.</p>
  </blockquote>
  <p>In our WordPress installation we currently have four users with admin privileges. Does the above tip mean we just need to make sure we have an admin account in WordPress that matches they primary admin account in Drupal and that we should be logged in using that account when we install CiviCRM in WordPress or does it mean something more complicated?</p>
  <p>Also, I am less familiar with Drupal: is there one primary admin in Drupal that is the admin name we need to match?</p>
  
Tags: <civicrm-home>
Title: CiviCRM users and migration from Drupal to WordPress
ThreadText: # CiviCRM users and migration from Drupal to WordPress
  
  (Asked by: username_0 on 2022-03-11)
  
  I am working on migrating a CiviCRM database from Drupal to WordPress. Right now I'm working on a development site in WordPress so I at this stage I am trying to test everything out in preparation for the real migration down the road. I am using this guide: <https://docs.civicrm.org/sysadmin/en/latest/misc/switching-cms/drupal-to-wordpress/>
  
  I have a couple of questions about this tip:
  
  > When you set up WordPress, make sure you use the same Administrator account name as the Drupal Administrator account. Otherwise, you might encounter DB errors and/or Foreign Constraint issues due to the WordPress account not being associated with the CRM Accounts. If you have no choice, make sure you synchronize your accounts prior to trying to edit anything else.
  
  In our WordPress installation we currently have four users with admin privileges. Does the above tip mean we just need to make sure we have an admin account in WordPress that matches they primary admin account in Drupal and that we should be logged in using that account when we install CiviCRM in WordPress or does it mean something more complicated?
  
  Also, I am less familiar with Drupal: is there one primary admin in Drupal that is the admin name we need to match?
  
  **Tags:** civicrm-home
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-03-11. Score: 1
  
  I've done WP-to-Drupal (and many other CMS migrations) with Civi, and I don't think that note is accurate.
  
  I believe it should say, "Make sure the administrator account you're logged in to WP with at the time of migration has an email that matches an administrator account in Drupal."
  
  There's a CiviCRM table `civicrm_uf_match`, which links CiviCRM contacts (in `civicrm_contact`) with the CMS users. When migrating, you should remove all entries except for the administrator user you're using in that moment.
  
  With regard to installing CiviCRM on WordPress - it doesn't really matter, as soon as you complete the installation you'll import your current database.
  
  Note that when a WP user visits CiviCRM for the first time, Civi will check the user's email against the existing contacts in Civi and link the account to a contact record. That's why clearing out `civicrm_uf_match` is a good choice, it will be regenerated as folks log in.
  
  > **Comments:**
  > **username_1**: I'll check the version control history to see who added that note and confer with them.  I suspect they mean the same thing I said here but the wording is ambiguous.  
  > **username_0**: Thank you, Jon M. That's very helpful. The one thing that's a bit odd is that the database restoration/import will happen via phpMyAdmin so there will not necessarily be anyone logged into WordPress when the database restoration happens. It sounds like maybe the three things to do are: 1) Make sure that an admin exists in WordPress that matches an admin in the source data, 2) clear out the civiccrm_uf_match table data except for the this admin user, and 3) once the data have been restored then run a "synchronize accounts" before doing anything else.  
  
  ---
  
  