How to import / migrate a Phorum database (via Vanilla Porter)

:mega: There is a more recent and orthodox guide to use if you want to import / migrate from Phorum, see Importing / migrating Phorum to Discourse - howto / developers - Discourse Meta

Here is the problem -

We have a students forum that we have been running since 2009 on Phorum (LAMP based forum) -
This solution was great then, but it started to date and lack functionality and support.
On top of that, backing up the database was a bit of a mission (+3Gb of sql data – phorum is saving avatars and other images in the database).

Discourse provides a lot of forum formats to import from, but not Phorum.

The solution-

After a few hours scratching our heads and testing different methods we came up with this solution that actually worked really well:

  1. Export mysql Phorum data to a local file “export-phorum.sql” – this is the longest part of the process
  2. Setup a local LAMP server (eg MAMP) and import the Phorum database
  3. Install “Simple Machines Forum” on the local server > link
  4. Install “Phorum to SMF 2” > link
  5. Install “Vanilla Porter” > link
  6. Use Vanilla Porter to generate the vanilla-export.txt file
  7. Tricky bit :: search/replace the generated file for category id “1000001” and replace it with “-1” (root category). More details here > link
  8. Import the modified vanilla file following those instructions > link
  9. Ta da! We have successfully imported +3000 users +20000 posts +100 categories


  • The items 1 & 2 are superfluous if you can afford to do temp installs on the production server – In our case it was a necessity as this server was running a really old version of PHP – and it feels cleaner :wink:
  • After importing all that data, the admin was complaining about a large queue of pending jobs that eventually went away – gmail avatar collection?
  • We lost the user avatars in the process (we are now looking at scrubbing the Phorum database for avatar data and using the api to upload the missing avatars)
  • All the imported users are now active – we will use the API to de-activate them.
  • Uploaded files were not moved across – in our case we are 30 of those that we have re-attached by hand with the admin account.
  • We recommend to thoroughly clean the Phorum database up before going through the process (spammy users and posts, users with no posts, etc)

That’s all folks. We thought that it could be interesting to share our process on that one, and even if it sounds heavy, it only took us half a day to get there, including (long) download times and struggling at step 6.

Of course comments and suggestions are welcome.

Have a good one!


Thanks for sharing! I moved it for ya and changed the title to reflect the unorthodox method of going via Vanilla Porter.

This seems like a ton of work that really should be replaced with a single importer, going through a intermediary format/export is like playing broken telephone.

1 Like

Thanks a lot Erlend. Much appreciated. Kind regards.

Well of course that’s ideal, but in the meantime there’s this :wink: And the “meantime” could be quite a while.

I don’t know how prevalent Phorum is, but considering that there’s no support for it in Vanilla Porter in spite of the broad range of supported imports, I’d say it’s a fairly rare occurrence. You would sooner see a user-contributed converter for phpBB 1/2.x or FluxBB.

If you’re already converting Phorum to SMF2, why don’t you import directly from SMF2 to Discourse? After all, Discourse has an importer for that. :wink:

1 Like

Hi Jens, we considered that at first but, that would have required to create a SMF install + database import on the fresh new server. It was a lot more efficient to upload a simple text file. I should have mention that in my process description.

Files wise, you’d only have to upload SMF2’s config file and uploads folder – which is optional and only required if you want to import attachments and avatars.

Other than that, the importer only needs access to SMF2’s MySQL database. Installing a local MySQL server and importin an SQL dump is one option, but you can just as easily connect through an SSH tunnel…

Any news on this? While the OP describes a good enough method, obviously a dedicated script will always be more preferable.

@techapj is writing a Phorum importer for a new customer. So there may be updates on this soon.


We now have official import script for Phorum: