Migrating from SMF to Discourse

No, unfortunately there is no reset feature. You may need to reinstall Discourse and manually copy the things you wish to keep, i.e. your design, customizations, category settings and such.

Migrating SMF2 to Discourse is quite possible, but because it involves interacting with the Linux console and since there are a few technological barriers to bridge, the process can be somewhat finicky. Basically:

  1. setup Discourse,
  2. make a backup,
  3. copy your old SMF2 forum to your new server under /var/discourse/shared/standalone/smf,
  4. install the mysql2 gem in the container and run the importer:
cd /var/discourse && ./launcher enter app
apt-get update && apt-get install libmysqlclient-dev
su - discourse
gem install mysql2
cd /var/www/discourse/script/import_scripts
ruby smf2.rb /shared/smf -h $myql_server -t $php_timezone

In the last command, replace $mysql_server with the hostname or IP address of SMF2’s database server. This server must be reachable over the internet; if direct access isn’t possible (due to a firewall, for instance), you can try to tunnel the connection through SSH (see TCP FORWARDING in man ssh). If you can’t connect to your old server via SSH, you may need to temporarily install MySQL on the new Discourse server and import an SQL dump.

Finally, $php_timezone is the default timezone used by PHP on your old server. You can skip this setting (also remove the -t switch in this case), but imported timestamps may be slightly off.

3 Likes