Punbb -> BBPress
I took Bruno Torres’ converter script as a foundation, and re-wrote it to work with the Punbb database architecture. Also, added in a tiny bit of string clean up, since Punbb allows foreign characters in the username field, and BBPress does not.
Here’s the code to look at:
And in a handy .zip for download:
A few important notes, since this is NOT at all pretty –
1) It uses a lot of memory, so make sure PHP has access to at least 16mb in php.ini. If I had more than 20 minutes to devote to this, I’d look into that and try to improve it, but hey.
2) If you’re importing a lot of data, you may need to split up the resultant sql file into smaller files less than 2mb in size. Add this to the list of things I would automate if I needed to use this script more than once.
3) I am using BBPress integrated with WPMU and included lines for importing into the WordPress user tables. After I noted and fixed the problem converting Punbb’s lax, apostrophe-laden usernames to nice and sanitary WP-friendly ones, the script ran like a charm. Seriously, if I’d known it would be this easy I would have done this six months ago.
4) The forum-parent to forum relationship imported correctly into the database, but displayed a little funny, so I manually re-ordered the forum items in the database and massaged the template a little bit to recognize forum parents a little bit differently, more PunBB style.
5) A clean WPMU and BBPress install is ideal, but I already had ten existing WP users, half of whom had a user account in the PunBB data I was merging. For such a small data set, it was very easy to manually correct this by deleting the PunBB users and making sure that the imported topics and posts for those users pointed to their current id.
Hopefully this will be a good start for those of us looking to move existing PunBB forums to BBPress & WordPress. Good luck, and let me know if you use it!
- You must be logged in to reply to this topic.