# Migrating from mybb

**URL:** https://meta.discourse.org/t/migrating-from-mybb/25563
**Category:** Support
**Created:** [February 23, 2015, 11:12am UTC](https://meta.discourse.org/t/migrating-from-mybb/25563 "2015-02-23T11:12:46Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)
#### Post date: [February 23, 2015, 12:40pm UTC](https://meta.discourse.org/t/migrating-from-mybb/25563/2 "2015-02-23T12:40:20Z")

</div>

I would generally recommend to run the importer in development mode, export the result as a backup and restore that into the production instance. If that is not an option for you, try this:

- Connect to your server, become `root` (if you’ve connected as a regular user) and `cd /var/discourse`
- SSH into or enter the running production container: `./launcher ssh app` or `./launcher enter app`.
- Become the discourse user: `su - discourse`
- Install the MySQL client gem: `gem install mysql2`
- Open the import script in an editor and fill in your old forum’s MySQL server address: `cd /var/www/discourse/script/import_scripts && nano mybb.rb`
- (You will most likely have to change your old server’s configuration or firewall to gain access to your MySQL server; if that isn’t possible, you may have to install MySQL inside the container and import a dump of the mybb database.)
- Run the importer: `ruby mybb.rb`

If everything worked, rebuild your production container to get rid of the MySQL server, gem and modifications to `mybb.rb`.

---

_[View the full topic](https://meta.discourse.org/t/migrating-from-mybb/25563)._
