# Detailed tutorial on migration from Flarum to Discourse

**URL:** https://meta.discourse.org/t/detailed-tutorial-on-migration-from-flarum-to-discourse/244884
**Category:** Migration
**Tags:** flarum
**Created:** [November 8, 2022, 5:55pm UTC](https://meta.discourse.org/t/detailed-tutorial-on-migration-from-flarum-to-discourse/244884 "2022-11-08T17:55:08Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [November 9, 2022, 2:19pm UTC](https://meta.discourse.org/t/detailed-tutorial-on-migration-from-flarum-to-discourse/244884/2 "2022-11-09T14:19:22Z")

</div>

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](https://meta.discourse.org/t/migrate-a-vbulletin-4-forum-to-discourse/54881) 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:

```plaintext
  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](https://github.com/communiteq/discourse-migratepassword/), 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.

---

_[View the full topic](https://meta.discourse.org/t/detailed-tutorial-on-migration-from-flarum-to-discourse/244884)._
