Migrate from another forum to Discourse

:mega: This guide serves as a high level overview of the migration process.

For specifics on the wide range of forum softwares to import, including Vanilla, phpBB3, SMF2, bbPress, and vBulletin, review our dedicated tutorials.

Not all scripts have tutorials, but an exhaustive list of available imports is available under the script/import_scripts folder on GitHub.

So you want to migrate your existing forum to Discourse? That’s great! Let’s get started!

1. Set Up a Development Environment

See the following topic to set up your environment: Set up an environment to migrate another forum to Discourse

(If you are developing a new importer or planning to make significant changes to en existing importer, you may wish instead to set up a development environment Refer the macOS, Ubuntu, or Windows installation guide for development.)

2. Read the Script & Modify as Needed

We highly recommend to read the script before performing import. You may also need to modify the script file before beginning.

Near the top of the scripts, a connection is made to the database containing the source data. At a minimum, these connection settings will need to be changed.

You may also want to change the SQL queries that fetch the data to import into Discourse. For example, if you want to exclude really old posts, you can add a condition to the WHERE clauses.

3. Run the Import

To run the intended import script, run the following commands:

cd path/to/your/discourse_folder
bundle exec ruby script/import_scripts/=import_script=.rb

This process will be similar for other import scripts.

Once the import is complete, verify the data is imported correctly.

4. Take a Backup & Restore It

If you’ve followed this guide and are running a development instance, you’ll need to take a backup of the database and restore it to the production Discourse instance.

Backup and restore via UI:

Restore via CLI:

Last Reviewed by @cocococosti on 2023-04-10T04:00:00Z

Last edited by @JammyDodger 2024-05-27T14:52:31Z

Check documentPerform check on document: