Migrating from mybb

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.

8 Likes