Import From Ning imports the contents of your Ning Network Archive into BuddyPress.
See the initial announcement here.
Download the most recent version
Instructions
- Install in your plugins folder and activate. I recommend using the plugin on a fresh WP/BP installation; if running on an installation with existing content, please make a database backup first.
- Download your Ning network export, using the Archiver tool as described here: http://help.ning.com/cgi-bin/ning.cfg/php/enduser/std_adp.php?p_faqid=3796
- Upload the content of your unzipped Ning export (a group of .json files, as well as several directories) to wp-content/ning-files. If this is the first time you’ve used this plugin, you’ll have to create the directory ning-files first.
- Visit the plugin panel at Dashboard > BuddyPress > Import From Ning and follow the instructions
Frequently Asked Questions
- What if I’m not running BuddyPress?
- Version 2.0 of Import From Ning does not support WordPress standalone. Use version 1.1: http://wordpress.org/extend/plugins/import-from-ning/download/
- What content will Import From Ning import?
- Import From Ning currently imports the following items from a Ning export: members, member profiles, member avatars, members comments (the “wall”), groups, discussions, and blogs. The plugin attempts to recognize inline images and copy them to the BuddyPress installation, so that you don’t lose the images you’ve put in your blog posts.
- What about my images, movies, and music?
- BuddyPress by itself does not currently support photo, movie, or music galleries. The best plugin available for images right now is BuddyPress Album+ , which is in the process of being adapted to support video and audio galleries as well. In the future, I hope to expand this plugin to import content for display with Album+, but in the meantime you can import your multimedia content manually.
- What do I do if I have a gargantuan network?
- The plugin is most reliable when working with relatively small sets of data, though I have tested it with a network import of over 1300 users. There are various safeguards built into Import From Ning, so that if a particular step fails to complete because your hosting environment runs out of memory, you can simply refresh the page to pick up from where you’ve left off.
- What’s with all these new groups?
- In BuddyPress, each forum must be associated with a group. In cases where your Ning discussion thread was not part of a group, Import From Ning creates a group corresponding to the discussion category and places the discussion topic there.
Be a pal
I spent many mornings building this plugin, so that WordPress and BuddyPress users – and especially my friends who are WP/BP consultants – could reap the benefits. If you use this plugin (especially for a paying client!) please consider a donation.
Import from Ning has been downloaded 4,572 times. Are you using this plugin? Consider a donation.
Version history
- 2.0 – July 23, 2010
- Added support for Ning network content
- 1.1 – April 18, 2010
- Switched from copy-and-paste to direct .csv upload
- Added BuddyPress profile field import functionality
- 1.0 – April 16, 2010
- Initial release
Okay…good news. Splitting the JSON file down to 2 MB worked. Now, we’re going to have to spit it down even further. I’m under the impression you have to keep the same file naming convention, which means you have to remove content, save a bit down, overwrite the file and just run it again. There’s gotta be a better way to do this, like somehow parsing the JSON file and only taking a little at a time. Anyway to set the importer so that if it sees a big file, it can manage that file efficiently, instead of crapping out and having to do everything manually?
BOONE! You’re killing me with overwriting the JSON file on an updgrade!!!!
That’s twice all my content has been deleted!
Yes…I know…I should have a backup somewhere else on the server. How was I to know.
(huge SIGH)
Okay…i can see that you’ve changed the path to content. Instead of putting the content in the plugin JSON folder…it’s now in wp-content/ning-content. Is that correct?
The plugin is telling me I have no files in the directory but they are there. The permissions are 777.
Has anyone else conquered this issue? Any advice?
Boone has moved the path to the files, because every new release was overwriting the JSON files directory. They should be moved outside of the plugins folder–I believe he set it to “uploads/ning-files” but I’m not logged into or have access to my FTP to view exactly. Check this thread or one of the other threads for the appropriate path. It may be in the Read Me file.
It turns out that the Ning file was missing a few characters. These characters were part of the markup for the ning-members-local.json and the plugin couldn’t parse the file. It then said that the file wasn’t there. Once the error was found (thanks Boone) it ate the file happily.
I am now having another issue, though.
Missing comments. These comments are missing from discussion posts that were imported as blogs. I am thinking I may need to do another pass?
Duplicate id’s between Ning JSON blogposts and forumtopics.
{"id":"2003008:Topic:1067","contributorName":"8wbjqz2kevz8","title":"blah1"{"id":"2003008:BlogPost:17720","contributorName":"2rutf0t82p6v8","title":"blah2"So, I fancy loading blog posts and discussions as blog posts separately would fix this. That is to say, anyone else who was doing this would still need to do this into a fresh DB so that bp-importer wouldn't move your comments around between the discussions and blog posts with the same id.
I decided to focus on the blogs to start with.
My goal was to check for errors, and to make sure that all the comments were transferred.
After the first run of Import-to-Ning 1 comment, the most recent comment, for each blog post was transferred.
I ran it again, and more comments were added. Most of the correct comments now appear, but there are additional comments that should not be there.
I have checked the JSON file and confirmed that these comments are no listed in the JSON file.
I can find no relationship between the BlogPost IDs, or the Comment IDs that would lead me to believe they were “simply” missplaced by a poor association.
The user IDs for the posters look fine, too.
Boone, do you have any ideas about this? What I could do next?
Again, I emptied the discussion JSON files, and put up all the rest of the files. Empty WP DB, fresh site. I went through the plugin, and the above is what I got.
If it’s only loading one comment per post per run, then it’s a bug. A brief look at the code isn’t making it obvious what’s happening – it looks like it should do a foreach over every blog comment.
As for comments missing for other reasons, I’m not sure. When you say “I have checked the JSON file and confirmed that these comments are no listed in the JSON file.”, do you mean that they ARE listed or ARE NOT listed?
Hi Boone,
I had this problem importing discussion items as blog posts. I found that I had to run the tool for as many times as the max # of comments for a post. Max comments on any posts was 45, so I ran the tool 45 timed and picked up 45 comments. It picked up the right comments, and only miss-placed a few of them, which I was happy with after 2 days of fussing with it.
Interesting – that must be a symptom of some different formatting in discussions than in blog posts. It could be, for instance, that blog comments are expected to be non-linear, while discussion posts are linear with respect to time.
Glad you were at least able to get the majority of the content over. Let me know how the export/import to Drupal goes for you.
Hey Boone:
Just an FYI, so you are aware. The Ning export pulls ALL users regardless of status, and puts them into your BuddyPress user database. That means flagged users or users who have been asked to be removed. They still exist in the Ning database. There is no documentation that says any flagged or removed Ning user would be pulled into the new system. It’s made my client quite upset, but there’s nothing anyone can do, because it’s Ning’s data. Anyone reading this post, make sure you go through your user database and pull anyone in their that requested privacy or was flagged. Also, make sure to “no-follow” your site, so that Google doesn’t cache your live profile pages in your test environment.
P.S. – Just to clarify, I meant to say it’s not your issue, Boone. You’re not responsible for what Ning puts out, and can only respond to requests based on our feedback. Hope you didn’t take that the wrong way. Wasn’t meant to point at you, meant to say Ning just dumps it all out there and we have to pick up the nasty little pieces.
It seems to me that the replies in Ning are allowed to be made to any comment or the post itself. Regardless, once inside WP everything appears flat, and so it is once they end up in Drupal. Running the tool multiple times was easiest with the back button. I should add that I edited the discussions file by inserting the blog publishing info into the post information, then renamed the file to “blogs” for the import. If I didn’t do that, and used the hacked version of bp-import I was getting unbelievable amounts of lost and missplaced comments.
You can see an example of the final Drupal import on this page:
http://commons.peerforge.com/discussion/p2p-social-currency-money-20
I think there was a hiccup with something about the usernames, too, for commenters, because the names are a little off from the account names, and not lit with links as they should be. The data is in, though, and the accounts are functional.
Thanks for the comment, Tony. I wasn’t aware that Ning had a concept of “suspended” users, much less that they put it into their export files :)
In the future, adding these lines
if ( $member->state != "active" )continue;
immediately after
foreach ( $members as $member_key => $member {around line 268 should make the importer skip any non-active members. There may be a more fine-grained solution (creating non-active WP members corresponding to non-active Ning members) but that’ll have to wait for the next version.
I have this error:
Warning: mysql_get_server_info(): supplied argument is not a valid MySQL-Link resource in /home/minhascitac/public_html/embuscadabibliotecaperdida/wp-includes/wp-db.php on line 1582
How to resolve?
Thanks.
Leonardo – It doesn’t sound like this is an error with my plugin. Is WordPress/BuddyPress working for you otherwise? Can you save new content?
This error appears when I import the forums. It starts to upload but always this error message appears. With that I am not able to migrate all messages. I do not know how to fix this problem that seems to be of WordPress and MySQL.
That’s a very peculiar error, Leonardo. I opened the WordPress file in question, and it looks like WordPress is unable to open a database connection at that moment. I have no idea why that would be the case. Try posting to the forums from the front end of BuddyPress and see if you get the same error.
Boone et al,
I wrote a detailed post on how to use the Ning Imported to migrate the posts to Drupal. I had some good success with it. I hope others in need will find it useful.
http://commons.peerforge.com/discussion/migrate-ning-drupal-import-ning-content-drupal
You can see the imported content at http://commons.peerforge.com/node/8/content/discussions
Thanks for the help with this, Boone. There are a couple bugs, but I can endure them as 98% of the comments ended up in the right place.
An awesome tutorial, Alex. I never would have thought to use WordPress as a bridge like this, but I’m so glad that it works!
Hi ,
I tyested the pug lin and it worked really well, i successfully imported blogs, comments, users, music , mictures etc … but i have a question
Is it possible to import several different Ning sites on the same WordPress 3 account ?
I fear that when i uplaod the files from my second ning account it will overwrite the archives from the one already imported .
Thanks and congratualtions u did an amazing job with that plug in
Hi Sammy,
So glad it worked well for you!
If you go through the import process again with a different set of files, nothing will be overwritten. When the plugin adds new users and new content, it simply tacks it onto the “end” of the database, so to speak. Everything should be correctly associated with the proper user. Keep in mind, though, that if you import into the same WordPress installation, all of the discussion topics and user profiles will be mixed together: they will no longer be separate communities.
Boone — fabulous plugin. I’d never had need to use it before, but, well, now’s the time.
However, I seem to have run into a hitch. I have around, oh, 300-500 members to import for a friend’s website, but the members json file is stopping after only so many, and not doing the full import. My inclination is to think it’s out of memory because when I try to start over and do it again, it loads the exact same members.
Any clues? I’m hoping the NING export file isn’t corrupt, which would be a shame, because I have no idea how to fix that. Looking closely at the details of the json file, however, I can’t see any obvious problems. (Looking at where it’s stopping.) Any ideas?
Thanks!
Arx Poetica – What happens when it “stops”? Do you see the footer of the WordPress Dashboard, or does the entire page stop loading at that point? As I suggest in the documentation, for large amounts of data you might need to hit the Refresh button when the plugin stops.
Yes, I see the footer, and I did read the documentation a few times. Tried refreshing, but it just doubles up the content. The strange thing is that it’s importing everything else just dandy. Groups, discussion, etc.
Unfortunately, after carefully reviewing my data, it appears that it’s actually the data itself. It appears that the archiver from Ning isn’t exporting all the content. I don’t get it, and I can’t be sure until really digging in there, but that’s the appearance.
I was able to download the .csv export from Ning, and that had all the members, but it’s missing the other data, so I’m just trying to figure out if it would be worth trying to reformat that .csv into some importable json.
Any further tips along this front would be appreciated. Any suggestions for how to import a .csv? I saw that it could be done with version 1.1, but I’m not certain how to do that now without converting it into a json string?
Thanks again.
The Ning exporter can deliver corrupt content in the discussions-local, which is the file that the importer calls. The data in this file comes “relative” and not absolute. The sister file is the non-local file, which may be okay. You can rename the sister file as the local file, but then you’ll have to do a search and replace in mysql to fix all your links to either relative or the absolute path of your URL.
I have had this issue myself…it’s the worst, because you have no idea what’s going on.
There can be a lot of reasons for corrupt files.
I had to get a new set from Ning because the first set was full of errors and missing data. I recommend trying that first.
The importer is not really designed for importing the CSV file. It will retrieve your member information from the JSON files. The CSV file has no real value beyond that information.
Just to concur with Alex and Tony: The JSON files that come from the Ning export can be buggy. The crappy part about it is that sometimes it’s a single character in a multiple-megabyte file, which makes it very, very hard to trace. Tony’s suggestion that you try the non-”local” version is a good one; even though you’ll get a lot of absolute links, it could be better than nothing.
The .csv importer in earlier versions of this plugin will import your members, but none of your data. I don’t really recommend using it.
I found this online JSON parser to be a big help in finding the JSON syntax errors.
I found four recurring syntax errors:
1. leading and trailing parentheses in json files
2. “}{” => “},{”
3. “}]{“=> “},{”
4. string values like “\uXXX\uXXX” need to be replaced with placeholder text
Thanks all for the input. I think I’m going to try and re-parse the JSON myself.
The new user email isn’t replacing the merge fields with the username and password.
In bp-functions.php line 1486 needs to be changed from:
wp_mail( $to, $subject, $email_text );
to:
wp_mail( $to, $subject, $message );
hi Boone, I’ve spent 2 days trying to get this right…. I’ve archived the ning files, uploaded them all to a wp-content/ning-files folder. Have visited the plugin panel at Dashboard > BuddyPress > … but can’t find “Import From Ning” in order to follow the instructions. I’m using the BuddyPress version that I downloaded at the top of your page here, with WP 2.9.2
Any help would be greatly appreciated!
Anita
Anita – You don’t see an “Import from Ning” link underneath Dashboard > BuddyPress on the left hand side? It should look like this: http://teleogistic.net/wp-content/uploads/2010/08/buddypress.jpg
If not, are you sure that you’ve installed and activated the Import from Ning plugin properly? Keep in mind that you have to install BuddyPress and *also* Import from Ning, and that they both must be activated at Dashboard > Plugins.
Ha! You’re a genius, thanks for that. Now i’ve just gotta sort out photos and a few odds and ends and I’m away! Thanks so much. Expect a donation soon! xx
So glad it worked, Anita!
Boone – thanks so much for this great plugin!
One question: I can’t find documentation on how the plugin handles users’ passwords. Are they imported from Ning, too – or do random passwords get assigned on import? I notice the username and password field in the template of the notification email and am assuming new random passwords have already been generated.
Thanks again! We are re-launching our network today on WP/BP at http://ugnchicago.com.
Josh – The plugin autogenerates a random password for each user. Seemed like a safer bet than trying to port over passwords in plaintext, etc. Users can change their passwords to something more memorable the first time they log into BP.
Good luck with the big move!
Is the fix Mark Simonds mentioned in comment 85 above necessary?
Catchable fatal error: Object of class WP_Error could not be converted to string in /home/cm/public_html/wp-content/plugins/import-from-ning/bp-functions.php on line 188
I am getting stuck at this error. Any ideas? I am going to run the archiver again and see if something went wrong there. Any help is appreciated!
I just read again and saw #51. I will try this, unless there is any new info. Thanks so much for the program!
Still at a loss. I have went and deleted the user that “could” have caused the error, but it is still giving me the same error.
Hey Boone. First, great tool. We’ve been trying to move from Ning and it’s turning out to be a real pain.
When I run the Archiver tool from Ning it only exports about 102 users out of 2126. It loops the same users over and over to get the correct total of 2126.
It looks like the archiver tool does export the blogs and images and everything else ok. And I can export the users correctly in the CSV file.
Could I use the CSV file to import the users with version 1.1 then use your ver 2 tools to import the content?
I know this might not be possible but I’v been waiting for Ning for over a month and the responce has been minimal. I starting to explore other options.
Cheers
Mark
Weird, I wonder why it would loop those same users. I would understand if it just stopped after a certain number (because of malformed data or something) but I don’t understand why (or even how) it would repeat them, given that it’s a foreach loop. Have you glanced at the Ning export data (members-local.json) to double-check that the error isn’t there? In other words, does the JSON file contain the same members repeated over and over again?
As for importing users via CSV, it will be tricky because the user IDs will probably not line up correctly. If you were willing to change the user IDs manually (itself a hard job, as it involves a lot of database digging) or to modify the way that v1.1 of the plugin works, you might be able to make it work right. But to be honest I’m not sure how it would work off the top of my head.
I have followed the instructions to the letter and I am getting an error message when I select the Import from Ning, that file files are not in the wp-content/ning-files file folder – but they are all there. Why is this happening?
Buster’s Mom – That almost certainly means that the Ning members-local.json file is corrupt or malformed somehow. This is not your fault. I’ve dealt personally with about 10-12 Ning exports, and probably half of them contained some sort of JSON errors. Unfortunately, the only way to know is to start cutting away entries from the JSON file and rerunning the importer until you are successful (using the process of elimination to find the bum entry). Entries are delimited by curly-brackets – check out the file and hopefully you’ll be able to figure it out. good luck!
That’s easy for you to say (smile)! I don’t know anything about JSON to even do what you suggested. All I can do now is to go to Ning and put in a ticket of some sort. Thanks for responding.
I got it to work! But for some reason not all of my members are there, but it’s okay. I am just testing it out. The member profile pictures didn’t come through though.
I know it’s been asked before, but can someone upload sample files, as I’d love to use this plugin to import users, blogs, etc from a custom site, but I have no idea about the data structures. Thank you so much.
If you are customizing a site for someone, they should use the Ning Export Tool to get you the JSON files and folders. My suggestion would be to use the Members JSON files & the Members folder as your starting test point. The JSON files correspond with the different files folders, i.e., Members, Blogs, Photos, Discussions, etc. Each Ning site is custom made so therefore our structures will be a little different (varying fields of info). The data on a member page is different across the board based off the profile questions each site creates, as well as the discussions, etc. Use the Ning Export tool to upload the files. It’s actually pretty simple to do now that I know my own file was just corrupt. Keep in mind that it takes several tries to get all the data. I had 247 members on one site and the tool will only bring in 101 of them. I don’t know why but will post that question.
@IsraelWebDev, Ning is offering a free 30-day trial. You could use that to create your own test site and to use the Export Tool for yourself during your testing phase. That might work for you.
@Buster’s Mom Thanks for the suggestion. I just had to do a search for one of the file names, “ning-members-local.json” and got a few “Index of” sites (allowing directory browsing) and downloaded the files I needed. Thanks Google!
Seemed to work like a charm, but the gravitars didn’t come through…they came down from ning, but didn’t upload….any ideas?
Just a huge thanks for building this plug-in and supporting it so well! I haven’t made the leap yet but I’m less anxious about it than I have been reading through… THANKS BOONE!