Detailed tutorial on migration from Flarum to Discourse

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.

3 Likes