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?
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
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:
- 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?
- How do I migrate users so that existing Discourse users become Wordpress site users?
- Is there a migration tool? Or otherwise what are the steps?
Install the WP Discourse plugin and enable the SSO Provider option. Doing this will force all users on your forum to login through WordPress.
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.’)
You might consider making discourse be the SSO master.
@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.