# What are the steps for migrating Discourse DB to Wordpress

**URL:** https://meta.discourse.org/t/what-are-the-steps-for-migrating-discourse-db-to-wordpress/92277
**Category:** WordPress
**Created:** [July 13, 2018, 2:30pm UTC](https://meta.discourse.org/t/what-are-the-steps-for-migrating-discourse-db-to-wordpress/92277 "2018-07-13T14:30:02Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![paulmasri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paulmasri/32/89783_2.png) [@paulmasri](https://meta.discourse.org/u/paulmasri)
#### Post date: [July 13, 2018, 2:30pm UTC](https://meta.discourse.org/t/what-are-the-steps-for-migrating-discourse-db-to-wordpress/92277/1 "2018-07-13T14:30:02Z")

</div>

Starting from an instance of Discourse that’s already set up and running using its own database, if I want to switch over to embedding it in a Wordpress site using the Discourse Wordpress plugin **and** I want to migrate over to using the Wordpress database, what are the steps involved?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 13, 2018, 3:20pm UTC](https://meta.discourse.org/t/what-are-the-steps-for-migrating-discourse-db-to-wordpress/92277/2 "2018-07-13T15:20:20Z")

</div>

> [@paulmasri](#):
>
> I want to migrate over to using the Wordpress database, what are the steps involved?

Why would you want to do that, even if it was possible?

afaik, they both use different DB engines:

- Discourse uses PostgresQL
- Wordpress uses MySQL/MariaDB

---

<div class="post-metadata">

### Author: ![paulmasri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paulmasri/32/89783_2.png) [@paulmasri](https://meta.discourse.org/u/paulmasri)
#### Post date: [July 13, 2018, 4:44pm UTC](https://meta.discourse.org/t/what-are-the-steps-for-migrating-discourse-db-to-wordpress/92277/3 "2018-07-13T16:44:01Z")

</div>

Perhaps it’s my phrasing of the question that’s the issue.

My client will soon be extending their Wordpress site with a membership area. I want a user who registers on the Wordpress site to also be a user of the Discourse forum that I plan to embed into the site. I have read about the Discourse Wordpress plugin and that Wordpress SSO is supported by Discourse.

So maybe my question should be phrased:

1. How do I take my standalone Discourse forum and embed it into a Wordpress site so that when a user signs into the Wordpress site they are also signing into Discourse?
2. How do I migrate users so that existing Discourse users become Wordpress site users?
3. Is there a migration tool? Or otherwise what are the steps?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [July 13, 2018, 5:55pm UTC](https://meta.discourse.org/t/what-are-the-steps-for-migrating-discourse-db-to-wordpress/92277/4 "2018-07-13T17:55:35Z")

</div>

> [@paulmasri](#):
>
> How do I take my standalone Discourse forum and embed it into a Wordpress site so that when a user signs into the Wordpress site they are also signing into Discourse?

Install the [WP Discourse](https://github.com/discourse/wp-discourse) plugin and enable the SSO Provider option. Doing this will force all users on your forum to login through WordPress.

> [@paulmasri](#):
>
> How do I migrate users so that existing Discourse users become Wordpress site users?

If your existing Discourse users create accounts on your WordPress site with the same email address they are using on Discourse, they will be able to login to their Discourse account through SSO. Your other option is to export a CSV file of your Discourse users from the Admin/Users page. You can then use a WordPress plugin to import the users into WordPress. There are numerous WordPress plugins that can handle this (search for ‘WordPress import users.’)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 14, 2018, 5:01am UTC](https://meta.discourse.org/t/what-are-the-steps-for-migrating-discourse-db-to-wordpress/92277/5 "2018-07-14T05:01:43Z")

</div>

You might consider making discourse be the SSO master.

---

<div class="post-metadata">

### Author: ![paulmasri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paulmasri/32/89783_2.png) [@paulmasri](https://meta.discourse.org/u/paulmasri)
#### Post date: [July 15, 2018, 1:01pm UTC](https://meta.discourse.org/t/what-are-the-steps-for-migrating-discourse-db-to-wordpress/92277/6 "2018-07-15T13:01:32Z")

</div>

Thanks, @simon, that’s really helpful.

---

<div class="post-metadata">

### Author: ![paulmasri](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paulmasri/32/89783_2.png) [@paulmasri](https://meta.discourse.org/u/paulmasri)
#### Post date: [July 15, 2018, 1:03pm UTC](https://meta.discourse.org/t/what-are-the-steps-for-migrating-discourse-db-to-wordpress/92277/7 "2018-07-15T13:03:32Z")

</div>

@pfaffman, I can see the validity of that in some circumstances.

In my case, we will be developing other member-only features within the Wordpress site, from member-only standard pages to mini web-apps. And we already have a separate web app + API that we plan to sync to the Wordpress DB, treating Wordpress as the master.

In this scenario, my instinct is to make Wordpress the master rather than Discourse.
