Answers.Body: <p>Assuming that a) you gave CiviCRM a separate database under Wordpress, and b) you installed the same version of CiviCRM under Drupal:</p>
  <ul>
  <li>Dump the current CiviCRM database to a .sql file.</li>
  <li>Load that database into Drupal.</li>
  <li>Review &quot;<a href="http://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location" rel="nofollow noreferrer">Moving an Existing Installation to a New Server or Location</a>&quot; for relevant details regarding deleting caches etc.</li>
  <li>Delete all the entries out of the <code>civicrm_uf_match</code> table in the CiviCRM database (while logged in as user 1).</li>
  <li>Go to <strong>Administer menu &gt; Users and Permissions &gt; Synchronize Users to Contacts</strong>.</li>
  </ul>
  <p>That should repopulate your <code>civicrm_uf_match</code> table and thus connect your Drupal users to contacts.  Log out and log in again (in a different browser) to make sure everything looks good - and clear your caches again!</p>
  <p>Don't forget to move the contents of <code>wp-content/uploads/civicrm</code> to <code>sites/default/files/civicrm</code>.  Don't move <code>templates_c</code>, but definitely move <code>ang</code> (if it exists), <code>persist</code> and <code>custom</code>.</p>
  <p><strong>Things to check</strong></p>
  <ul>
  <li>If you use Mosaico, your templates will reference image locations that don't exist anymore.  You'll want to run something like this:</li>
  </ul>
  <pre><code>cv api MosaicoTemplate.replaceurls to_url=&quot;https://yoursite.org/sites/all/civicrm-custom/extensions/uk.co.vedaconsulting.mosaico/packages/mosaico/templates&quot; from_url=&quot;https://yoursite.org/wp-content/civicrm-custom/extensions/uk.co.vedaconsulting.mosaico/packages/mosaico/templates&quot; 
  </code></pre>
  <ul>
  <li>If you want to copy mailings that were sent before the switchover, you need to do something similar on <code>civicrm_mailing</code>.  Here's an example of one I did:</li>
  </ul>
  <pre><code>UPDATE civicrm_mailing SET template_options = REPLACE(template_options, 'https:\\/\\/mysite.org\\/sites\\/wiscience.wisc.edu\\/files\\/civicrm', 'https:\\/\\/mysite.org\\/wp-content\\/uploads\\/civicrm');
  UPDATE civicrm_mailing SET template_options = REPLACE(template_options, 'https:\\/\\/mysite.org\\/sites\\/all\\/civicrm-custom\\/extensions', 'https:\\/\\/mysite.org\\/wp-content\\/civicrm-custom\\/extensions');
  UPDATE civicrm_mailing SET body_html = REPLACE(body_html, 'https%3A%2F%2Fmysite.org%2Fsites%2Fwiscience.wisc.edu%2Ffiles%2Fcivicrm', 'https%3A%2F%2Fmysite.org%2Fwp-content%2Fuploads%2Fcivicrm');
  </code></pre>
  <ul>
  <li>If you use a payment processor with a &quot;Silent Post URL&quot; or &quot;IPN&quot;, make sure you've changed over to the new style of IPN endpoint before migrating - that is, <code>https://yoursite.org/civicrm/payment/ipn/XX</code> (<code>XX</code> being the payment processor ID) and not one that ends in <code>extern/ipn.php</code>.  Otherwise your IPNs aren't cross-CMS compatible.</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-16T17:01:16.637Z
Answers.Text: Hi. Thanks for the answer. Yes Wordpress has it's own Civi database and it's the same version as Drupal. Unfortunately, when I try to import the Wordpress database into Drupal, I get this error: [ERROR in query 7] Access denied; you need (at least one of) the SUPER privilege(s) for this operation. 
  
  What does that mean?
Answers.UserDisplayName: Steve Barakat
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-16T17:19:53.713Z
Answers.Text: Also, when you say "Dump" do you mean export via phpMyAdmin (or Sequel Pro)?
Answers.UserDisplayName: Steve Barakat
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-16T18:38:45.437Z
Answers.Text: Yeah, export via the tool of your choice - phpMyAdmin works!  As for the error - that really deserves its own question, so I posted the question (and answer) here: http://civicrm.stackexchange.com/questions/619/why-do-i-get-access-denied-you-need-at-least-one-of-the-super-privileges-f/620#620
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2015-04-15T16:29:39.033Z
Answers.LastActivityDate: 2024-05-03T21:12:24.463Z
Answers.LastEditDate: 2024-05-03T21:12:24.463Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>We are using CiviCRM with Wordpress and would like to switch it to Drupal. I have created a fresh Drupal/CiviCRM install and gave CiviCRM it's own database. How do I go about transferring the data from the old Wordpress site to the new Drupal site?</p>
  
Tags: <wordpress><drupal>
Title: How To Migrate CiviCRM From Wordpress To Drupal?
ThreadText: # How To Migrate CiviCRM From Wordpress To Drupal?
  
  (Asked by: username_0 on 2015-04-15)
  
  We are using CiviCRM with Wordpress and would like to switch it to Drupal. I have created a fresh Drupal/CiviCRM install and gave CiviCRM it's own database. How do I go about transferring the data from the old Wordpress site to the new Drupal site?
  
  **Tags:** wordpress, drupal
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-04-15. Score: 8
  
  Assuming that a) you gave CiviCRM a separate database under Wordpress, and b) you installed the same version of CiviCRM under Drupal:
  
  * Dump the current CiviCRM database to a .sql file.
  * Load that database into Drupal.
  * Review "[Moving an Existing Installation to a New Server or Location](http://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location)" for relevant details regarding deleting caches etc.
  * Delete all the entries out of the `civicrm_uf_match` table in the CiviCRM database (while logged in as user 1).
  * Go to **Administer menu > Users and Permissions > Synchronize Users to Contacts**.
  
  That should repopulate your `civicrm_uf_match` table and thus connect your Drupal users to contacts. Log out and log in again (in a different browser) to make sure everything looks good - and clear your caches again!
  
  Don't forget to move the contents of `wp-content/uploads/civicrm` to `sites/default/files/civicrm`. Don't move `templates_c`, but definitely move `ang` (if it exists), `persist` and `custom`.
  
  **Things to check**
  
  * If you use Mosaico, your templates will reference image locations that don't exist anymore. You'll want to run something like this:
  
  ```
  cv api MosaicoTemplate.replaceurls to_url="https://yoursite.org/sites/all/civicrm-custom/extensions/uk.co.vedaconsulting.mosaico/packages/mosaico/templates" from_url="https://yoursite.org/wp-content/civicrm-custom/extensions/uk.co.vedaconsulting.mosaico/packages/mosaico/templates" 
  
  ```
  
  * If you want to copy mailings that were sent before the switchover, you need to do something similar on `civicrm_mailing`. Here's an example of one I did:
  
  ```
  UPDATE civicrm_mailing SET template_options = REPLACE(template_options, 'https:\\/\\/mysite.org\\/sites\\/wiscience.wisc.edu\\/files\\/civicrm', 'https:\\/\\/mysite.org\\/wp-content\\/uploads\\/civicrm');
  UPDATE civicrm_mailing SET template_options = REPLACE(template_options, 'https:\\/\\/mysite.org\\/sites\\/all\\/civicrm-custom\\/extensions', 'https:\\/\\/mysite.org\\/wp-content\\/civicrm-custom\\/extensions');
  UPDATE civicrm_mailing SET body_html = REPLACE(body_html, 'https%3A%2F%2Fmysite.org%2Fsites%2Fwiscience.wisc.edu%2Ffiles%2Fcivicrm', 'https%3A%2F%2Fmysite.org%2Fwp-content%2Fuploads%2Fcivicrm');
  
  ```
  
  * If you use a payment processor with a "Silent Post URL" or "IPN", make sure you've changed over to the new style of IPN endpoint before migrating - that is, `https://yoursite.org/civicrm/payment/ipn/XX` (`XX` being the payment processor ID) and not one that ends in `extern/ipn.php`. Otherwise your IPNs aren't cross-CMS compatible.
  
  > **Comments:**
  > **username_0**: Hi. Thanks for the answer. Yes Wordpress has it's own Civi database and it's the same version as Drupal. Unfortunately, when I try to import the Wordpress database into Drupal, I get this error: [ERROR in query 7] Access denied; you need (at least one of) the SUPER privilege(s) for this operation.   What does that mean?  
  > **username_0**: Also, when you say "Dump" do you mean export via phpMyAdmin (or Sequel Pro)?  
  > **username_1**: Yeah, export via the tool of your choice - phpMyAdmin works!  As for the error - that really deserves its own question, so I posted the question (and answer) here: http://civicrm.stackexchange.com/questions/619/why-do-i-get-access-denied-you-need-at-least-one-of-the-super-privileges-f/620#620  
  
  ---
  
  