Detailed tutorial on migration from Flarum to Discourse

Hi! I was using flarum to host my forum with about 1k posts and users. And I was thinking about migrating from flarum to discourse lately. I have checked several posts on this but didn’t find a detailed tutorial to do this.

Now I have the database as a .sql file and have the discourse installed on my server with the migration .rb scrip in the development environment but don’t know how to proceed with the migration process and would really appreciate a tutorial on this.

Another question is with the official .rb script, can I also mgirate the users as well as their passwords to the new discourse forum?

Many thanks!

Pretty much all of the import scripts work the same way. You somehow get a database that Discourse can access, usually by installing one locally and pushing the data there (e.g., mysql mydatabase < thedatabasedump.sql). Migrate a vBulletin 4 forum to Discourse should be a good enough model, but instead of export DB_NAME="vb4" and so on in that howto, these are the ENV variables you’ll set:

  FLARUM_HOST ||= ENV['FLARUM_HOST'] || "db_host"
  FLARUM_DB ||= ENV['FLARUM_DB'] || "db_name"
  BATCH_SIZE ||= 1000
  FLARUM_USER ||= ENV['FLARUM_USER'] || "db_user"
  FLARUM_PW ||= ENV['FLARUM_PW'] || "db_user_pass"

The script doesn’t import passwords. You’ll need to add a bit of code to the script and probably to the migrate password plugin, though there is a chance that flarum uses one of the cyphers that is implemented already (it happened to me once–on a lark I imported the password on some random custom forum I wrote a script for and it Just Worked). It’s probably not a bad idea to just make everyone reset their password; the biggest problem is people who know their password but don’t have access to the email address associated with their account.


thanks for the reply! i’ll try this out

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.