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.
After a few hours scratching our heads and testing different methods we came up with this solution that actually worked really well:
- Export mysql Phorum data to a local file “export-phorum.sql” – this is the longest part of the process
- Setup a local LAMP server (eg MAMP) and import the Phorum database
- Install “Simple Machines Forum” on the local server > link
- Install “Phorum to SMF 2” > link
- Install “Vanilla Porter” > link
- Use Vanilla Porter to generate the vanilla-export.txt file
- Tricky bit :: search/replace the generated file for category id “1000001” and replace it with “-1” (root category). More details here > link
- Import the modified vanilla file following those instructions > link
- 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
- 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!