Detailed tutorial on migration from Flarum to Discourse

AI-generated summary

Detailed Tutorial on Migration from Flarum to Discourse

The discussion revolves around migrating a forum from Flarum to Discourse. The original poster, Charlie_Li, has a Flarum database with approximately 1,000 posts and users and is looking for a detailed tutorial on how to migrate to Discourse using the official migration .rb script.

pfaffman provides guidance, suggesting that the import script works similarly to other migration scripts. They outline the process of accessing the database, setting environment variables, and executing the script. However, they note that the script does not import passwords, and Charlie_Li would need to add code to the script and potentially use the migrate password plugin. Alternatively, pfaffman suggests making users reset their passwords.

Charlie_Li thanks pfaffman for the response and plans to try out the migration process.

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