Flarum to Discourse Migration Script

Hey All,

Just figured I’d make a quick post with a little bit on how I migrated our 25,000+ member, 250,000+ post forum from Flarum to Discourse.

As I’m sure you know if you’re reading this, there’s no official import script for Flarum → Discourse, however @koen360 was kind enough to share his work with getting the FluxBB importer modified to import users. However, we needed to also import posts as a large part of our forums success rides on users searching for very specific terms that appear in posts. So that’s what we did…with several hours of failed migrations, headaches, and some bloodshed.

I’m by no means an expert in writing migration scripts, but this script works well enough for the current version of Flarum at the time of writing (V0.1.0-beta.16). The script (attached below) will need access to your MySQL/MariaDB database, preferably a copy of it so you don’t wreck your production site if something goes wrong. Just replace the dummy values in the MySQL connection and you should be set.

Just make sure you have a full backup of your Flarum database before you start this process, if something goes wrong it’s likely irreversible.

If you need assistance with your migration from Flarum → Discourse feel free to reply to this thread, I’m by no means an expert, but I’ll try to help out however I can.

You can get the importer here, apparently I can’t upload a file since this is my first post


Thanks for making the script @Lecter! Can you submit it as a PR to discourse/discourse? We don’t have a Flarum script yet, so this would be helpful to have as a base.


Absolutely! PR Incoming…


This is great, thank you for taking this importer a step further! :sparkling_heart: I do hope in time it can also be expanded to include Tags, if not Attachments.

How much work might it be to add Tag support? I see vBulletin 5 and maybe a couple others have possible models of how it works, but I have no idea how much that would need to be adjusted for Flarum. Thanks for any insight anyone can provide, and no worries if it’s not something that can really be answered without doing it. :grinning_face_with_smiling_eyes: