Question

Here's the setup:

  • The client uses a proprietary custom-coded PHP CMS and is wanting to move to WordPress with BuddyPress.

  • The old, custom CMS has a roster functionality, which I'm using BuddyPress custom fields to replace.

  • The custom fields are basic contact info (Phone, Fax) and company info (Text field).

What is the best way to import these? It seems my two options are:

  1. Create a pretty large SQL query that reformats this data between databases (I'm about 3 hours into doing it this way so far)

  2. Export it into some sort of JSON format and use the Ning importer.

If the best option is using the Ning importer, know where I can get an example Ning user list CSV so I may format the user data accordingly? If the best option is using a big MySQL query, what are some things I should look at in terms of row values WordPress expects?

Many thanks!

Was it helpful?

Solution

I ended up writing a bunch of MySQL statements. My process went:

  1. Add users into wp_users.
  2. Add first name into wp_usermeta.
  3. Add last name into wp_usermeta.
  4. Add nickname into wp_usermeta.
  5. Add last activity into wp_usermeta. (This is important for BuddyPress; otherwise, users won't show up in the members-loop)
  6. Add name to BuddyPress.
  7. Add custom "phone" field to BP.
  8. Add custom "fax" field to BP.
  9. Add custom "company" field to BP.

If anybody doing something similar comes across this question and would like the SQL I used, feel free to message me. After half a dozen people requested the SQL code I have, I've written a blog post that includes the full SQL I used, plus a basic importer script. See: http://aendrew.com/content/importing-proprietary-user-database-buddypress-boss

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top