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,556 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
Hey Boone. I was able to finally get a proper export. Ning finally admitted it was an error on their end causing the loop. They fixed it and the export now works.
Anyway, when I try an import I get this fatal error:
Maximum execution time of 30 seconds exceeded in /home/hardcore/public_html/wp-includes/functions.php on line 722
Any ideas?
Also, all the avatars did download but it looks like most of them are not importing. thoughts?
Cheers
Mark
I am using BuddyPress Version 1.5.3.1 and Import From Ning Version 2.0.7.
Everything imported nicely except for the avatars. After rooting around the code I realized that this was because BP_AVATAR_UPLOAD_PATH was not being initialized in the BuddyPress code. I addressed this by initializing it in the Import From Ning code — I added the following to the top of import-from-ning/bp-functions.php:
if ( !defined( 'BP_AVATAR_UPLOAD_PATH' ) )
define( 'BP_AVATAR_UPLOAD_PATH', wp_upload_dir() );
I hope that helps.
Enjoy,
Robert
CORRECTION
The code should be:
define("BP_AVATAR_UPLOAD_PATH", ABSPATH . '/wp-content/uploads');
Tom – Avatar copying can be a bit tricky, as it requires certain server permissions that you might not have control over (especially if you’re on shared hosting). So unfortunately I don’t really have a good suggestion for you.
EA – Thanks, and good luck!
Mark – It sounds like you’re trying to import a large amount of data in a situation where you have relatively limited memory. Are you using shared hosting? The avatar problem could be related – the fact that some, but not all, are coming through suggests that the copy procedure might be timing out.
Hi Boone. I’ve increased the memory on the server and the timeout and the import seems to be running ok.
But it looks like the images are not being moved. The avatars that are showing up have direct links outside the page. and the images on the blog post are linking to “site/members/membername/blogs/1-1000/jpgname” but there is not a members directory under the root? Could it be a permissions error not creating or moving the files?
Would it be easier to email you a link to the images so I can show you what I am talking about?
Cheers
Mark
Mark – You can send a link if you want to (twitter handle at gmail).
The image paths that you’ve cited make it seem unlikely that server permissions are the problem. It sounds like it’s probably a problem with the way that the plugin tries to handle inline images. I’m not sure how much time I have to try to fix that problem, but if I can see the actual markup I might be able to have a quick look at the plugin code.
Hi Boone. I have successfully done two imports from ning to buddypress before but having problems with a 3rd site.
Even though all my files are uploaded to the ning-files dir, I’m still getting a “couldn’t find a members file”. I’ve opened the file and everything in it looks similar to the ones I’ve used before. Any ideas as to what the problem might be?
Just to add on to my previous comment, I’ve exported the members file from the ning site twice now, but it still is giving the issue.
Hi,
I was having issues importing members avatars. They simply would not beeing imported. Looking at the code I managed to find the problem.
The code is looking for the avatars in the plugin folder. All I did was changed it so it now looks at the ning-files folder.
so, here it is. in plugins/import-from-ning/bp-functions.php
Line 193
was: $oldfilepath = WP_PLUGIN_DIR . ‘/import-from-ning/json/’ . $f[0];
fixed: $oldfilepath = WP_CONTENT_DIR . ‘/ning-files/’ . $f[0];
cheers
Leo,,
Hi Leo. That code change fixed my avatar import issue, YAY!. I aslo made a similar code change on line 492.
now when I try an import it gets amlost all the way through the users but gives me an error:
Object of class WP_Error could not be converted to string in /wp-content/plugins/import-from-ning/bp-functions.php on line 212
I have reset all permissions on folders and still same error. Thoughts? Looks like it’s trying to create a folder for users that already exist?
Cheers
Mark
I keep getting this error:
Warning: file_get_contents(/home/content/53/5492253/html/findvirtualsocialnetwork/wp-content/ning-files/ning-members-local.json) [function.file-get-contents]: failed to open stream: No such file or directory in /home/content/53/5492253/html/findvirtualsocialnetwork/wp-content/plugins/import-from-ning/bp-functions.php on line 92
Jason – Is there a ning-members-local.json file in wp-content/ning-files?
I generated the username/password notification email, and all were sent with the:
%username%
%password%
as in the template.
Any ideas on why this would happen, and how can I resend this with the usernames and passwords included?
Thanks!
Tom
PS…please expedite this, as I have a pretty upset client! : (
Did you retype the content of the email yourself? I am pretty sure that the replacement strings have to be uppercase or they won’t be replaced – %USERNAME% and not %username%
I checked and it was uppercase for both UN and password.
Tom – In that case, I can’t tell what would have gone wrong. Look at bp-functions.php bp_ning_import_sent_email_markup(). The code is very straightforward. If the str_replace() statements are failing, it might mean there is a text encoding problem or something like that. I would suggest putting some var_dump() and die() statements in there to see if $email_text is getting mangled somehow.
@boone – You lost me on that one…I’ll try to work through it. Any suggestions would be greatly appreciated.
Tom
@boone in reply to 120 – yes, I created a directory wp-content/ning-files and dropped the ning-members-local.json file in there.
I deleted the plug-in and started from scratch.
I am assuming that this is the first step, or, should I have installed files somewhere else prior to loading the ning-members-local.json file?
Thanks in advance!
Anybody know how to fix this problem?
Warning: Invalid argument supplied for foreach() in /home/mezmedia/public_html/wp-content/plugins/import-from-ning/import-from-ning.php on line 166
Import Users from Ning
Step Two: Create the Users
No users successfully imported. Are you sure that your .CSV is correctly formatted? Try downloading it again from Ning, and start the import process over again with the new file. Warning: Don’t try to edit the .CSV file in MS Excel, as it’s known to cause problems
Ok, finally got the Importer to work, however I’m getting this error message, Fatal error: Out of memory (allocated 65011712) (tried to allocate 40209915 bytes), my JSON file, ning-members-local.json is 19MB, 14,000 profiles…at this point, I just want to bring in the profiles, name, email, etc. How to do I make that JSON file smaller?
Please help.
Jon, increase the PHP memroy to 128MB. you can have your hosting provider do this or you can if you have access to your php.ini file. or you can add a line to the htaccess file like so:
php_value memory_limit 128M
That should help. I had to put mine to 256 and my JSON files were about 14MB.
Cheers
Mark
Hi Boone
i need your help
it has been around a week and my web is down cause i have cancelled my ning subscription because i moved to wordpress
Before i did that i tried wordpress using your import to ning plug and it worked and deleted it cause it was just a trial
now when i already cancelled ning and trying to get everything ready in wordpress when i reach the step of importing i get the below error
”Here’s what it actually says…
”In order to run the importer, you must first use your FTP program to upload the contents of your Ning export into a directory called ning-files in your wp-content directory. The plugin couldn’t find a members file at wp-content/ning-files/ning-members-local.json, which probably means that you haven’t uploaded the files to the right place. Upload your unzipped export to the json directory, and try visiting this page again.”
Plsssssssssssssssssssssssssss help me out i searched everywhere in the net i could only find the below two links
http://teleogistic.net/code/wordpresswordpress-mu/import-from-ning/
http://buddypress.org/community/members/kswaters/activity/127364
non of them helped me
i have been awake since last night until now it is already around 11am
hope i get a respond from you as soon as you can
thanks
Adil – Are you sure you have put the Ning files in the correct place? If so, the problem is probably that the files are invalid. The only advice I can give you in that case is to try to figure out where the invalid json is coming from, by paring away pieces of the members-local.json file until you can get the importer to recognize it.
I’m baffled at how the avator import process works, since I can’t find where WordPress is storing Avatar info. I’ve looked in the “users” table, where I’d expect them to be, and there is no field for them. I can see in the .json file that the info is there, but I have no clue where they should be imported into WordPress. I tried the suggestion above to change line 193 in the bp-functions.php file, but when I try to re-run the importer I get a message ” Object of class WP_Error could not be converted to string . . on line 188″ whether I’ve changed line 193 or not. Since it ran find the first time, I’m assuming it’s because I’m trying to re-rerun the import. I don’t have so many avatars I couldn’t add them manually if I knew where to put that data! Any suggestions much appreciated.
BP avatar data is not stored anywhere in the db. They are stored in a directory tree that is keyed by user id. See /wp-content/uploads/avatars. (wp-content/blogs.dir/1/avatars on MS)
I have exported the CSV file from my ning site and would like to import that CSV file into my site. Import Users from Ning plugin and have added a file named “membersdata.csv” to the folder wp-content/plugins/import-from-ning/json. Not sure how the whole json thing works. is that a file format? or can the program simply read my CSV file in the method i used above. Please advise. I’d be happy to give you access to my website to test. Thanks! Robert
How to import avatars after you import from ning
The avatars are stored in your export subdirectory under “members”. Each one begins with the id of the user.
1. Pick any user and find the id of the user in your new buddypress database. You do this by Dashboard/users/ and picking a user to edit. Look up in the URL bar and you’ll see something like user_id=204 in the url. Now find the same user on the ning site and figure out their id in ning. (I just looked at their avatar then then looked at my local folder “members” with icon view and picked out the person’s icon.
So now you have the new id and you know the name of their old avatar file which starts with their old id number. So in my case their old avatar was called 205-blahblah.jpg. (we only care about the number and dash in its name)
Now I know that every avatar is numbered one MORE than the new user id.
2) Now I have to massage the avatars to be the right size for Buddypress. Buddy press wants TWO avatars. One called anything-bpfull.jpg or anything-bpfull.png or anything-bpfull.gif is 150×150 pixels. The other, called anything-bpthumb.jpg (or png or gif) is 50×50 pixels.
Since I had about 300 avatars to resize I used Gimp (open source) Filters/Batch/Batch Process to resize and rename each file to whatever-bpthumb.png. Then I ran it again to resize and rename each file to whatever-bpfull.png.
3) Then I created folders called 2, 3, 4….300 and moved 204-blahblah-bpfull.png and 204-blahblah-bpthumb.png into folder 203 and so on. (Because in my case each person had a different id in the new set up that was one lower then the number of their avatar. Your situation may well be different)
4) ftp’d all the folders (2,3…) to the folder /wp-content/uploads/avatars
That’s all!
BTW, group avatars are stored in numbered folders (matching the group id) under /mauifoodweb.org/wp-content/uploads/goup-avatars
I had a problem when I did the last step and invited people. Their username and passward showed up as %USERNAME% %PASSWORD% instead of being replaced by the real values.
Know how I can resend with the correct info?
PS – THANK YOU!!!! Import from Ning was a LIFE SAVER!!!
Someone asked for an example site that successfully used this plugin to go from ning to buddypress.
For the next couple days you can see the original ning site at mauifoodweb.org and the new buddypress site at mauifoodweb.maui-tomorrow.org
After that mauifoodweb.org will take you to the new site.
I had to do some manipulation of eventpress to get it to display properly in my custom theme. But the ning import went smooth as silk (except for I had to go through a hand process for avatars – see above comment and my email to my users failed to replace the variables)
Gotta admit it really po’d me that ning made me download a special program to archive their content…what a pain!
Correction to my avatar upload instructions:
“/mauifoodweb.org/wp-content/uploads/goup-avatars”
should be
/wp-content/uploads/group-avatars”
You may have to create both avatars and group-avatars directories. I did.
Hi – I’m still trying to email my users. I just downloaded the most recent version of the plugin 2.05 and I see two problems.
1. I already imported the users and the passwords were not stored in the options table (user name, login, etc was)
There is an error over and above that in the mailing code:
foreach ( (array)$users['success'] as $user ) {
$to = $user['user_email'];
$message = str_replace( “%USERNAME%”, $user['user_login'], $email_text );
$message = str_replace( “%PASSWORD%”, $user['password'], $message );
wp_mail( $to, $subject, $email_text );
}
Notice that $email_text is the raw message and $message is what should be in the last statement – better yet, eliminate the new variable entirely:
foreach ( (array)$users['success'] as $user ) {
$to = $user['user_email'];
$email_text = str_replace( “%USERNAME%”, $user['user_login'], $email_text );
$email_text = str_replace( “%PASSWORD%”, $user['password'], $email_text );
wp_mail( $to, $subject, $email_text );
}
Bud sadly, although I can get the encoded password, I fear that since the version of import-to-ning I ran did not store the passwords in the database, they’re unobtainable.
Still a wonderful tool and I thank you LOTS for creating it.
Karen
Hi Karen,
Thanks a million for your contributions here.
Re: avatars. The plugin is supposed to do this automatically, but differing server setups (as well as, I’m sure, some bugs) make it not work in all cases. Thanks very much for the manual instructions!
Re: emails. That $message/$email_text error is really serious – so sorry about it. I just released 2.0.6 with a fix.
Re: passwords. I do save the raw user data, including autogenerated passwords, in an option called bp_ning_import_users. At this point, I would recommend using that data to write a quick script yourself to do the emailing. It’ll look something like this:
$bp_user_list = get_option( 'bp_ning_import_users' );
foreach( $bp_user_list as $bp_user ) {
// Get the username
$username = $bp_user['user_login'];
// Get the user email (not stored in the option, so we have to call it up)
$userdata = get_userdata( $bp_user['id'] );
$email = $userdata->user_email;
// Get the password
$password = $bp_user['password'];
// Now copy over some of the code from the plugin itself to concatenate the mail and send it using wp_mail().
}
I have not done an extensive test of this, but something like it should work. And again, sorry about the problem with $message/$email_text that made it happen.
Boone – I installed the latest version of ‘import ning’ plugin tonight. I was able to import members and profiles, but when it gets to importing ‘Groups’ it is hanging. It does not show anything under ‘Created Groups’, and if I refresh the import page (or restart the entire import) I get one new unnamed group for every refresh/restart (as seen in separate window for site). Every group shows age of 41 years, 3 months, and lead nowhere. I have attempted this 55 times now, always with same results.
Any suggestions?
I looked in the ning backup folder, and the file ‘ning-groups.json’ contains only:
([])
The ning site I am converting from does NOT show a ‘Groups’ tab. I do not know why there is no tab, but I assume that your importer doesn’t know what to do with ‘no groups’…
I cannot find the menu item. How about the URL?
Thanks much, Boone. Your plugin sure saved me DAYS of work!
Grabbed this from another plugin –
if you want to be WP 3.1 compatible, the menu hook should be:
add_action(is_multisite() ? ‘network_admin_menu’ : ‘admin_menu’, ‘bp_ning_import_add_management_pages’);
The is_multisite() check might not be necessary, as you probably have to be multisite for most of this to work, right?
Actually, MauiFoodWeb.org is not multisite.
Iam using the latest version of your Ning-to-Wordpress plugin, the latest version of Buddypress, WP 3.1.1 and use the WhiteHouse theme from Pagelines. My ning-files folder is was FTP’d to the server. My Ning export contains 376 members and a nominal amount of content.
I started the import process. Members imported properly and required a few refreshes. Profiles imported properly.
When the plugin got to the Groups import step, it hangs. The text message instructs me to hit refresh a few times and click the “Continue” button. There is no Continue button. As a result, I can’t finish this step and can’t move on to the next step.
The most important thing for me to be able to import into my WP site is the blog posts and their comments.
Your guidance would be greatly appreciated!
The same for me as comment 145 (by Scott Graves)
I figured out how to solve it: just create an empty file in the folder ning-files and name it “ning-groups-local.json”.
Another problem: I’m importing the forum but after it imported many discussions, it gives me “Refresh to import more discussions”. I refresh but it loads always the same discussion ending with “Refresh to import more discussions”. of course I stucks there and I can’t import anything else!
Hi,
I did some improvements, include a Ajax layer in order to avoid time out errors.
I want to share it with you! Is there any file repository where I can push those updates.
Thanks for the plugin! It is very useful for me!
Regards
I am attempting an import and I get fatal errors with not refresh option. I have been F5 refreshing and it is uploading the members table. After several F5s, it get
“Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.”
repeatedly. I have set permissions 777 and that doesn’t help.
Ack! Astacia – quick set your directory back to normal permissions. 777 leaves your server wide open to hackers.
First you have to ftp your files exported from ning up to the server. If you are just setting up, you may want to wipe your wp installation and start over installing wordpress, buddypress and then try the import process again. (That’s what’ I’d do but perhaps the author has a better method)
Check your .htaccess files…maybe something’s screwy there?
@karen- it is a test site, totally clean install. only buddypress and the import are installed. It’s the default .htaccess
After more time working with it, I have found it’s my FTP. 3 reloads is using up my 10 allowed connections. I then have to kill all connections.
Each time I hit the continue button, the next screen says
“Importing users – this may take a while.
If you see a Refresh message at the bottom of the page you’ll need to refresh the page in order to continue importing.
Fatal error: Maximum execution time of 30 seconds exceeded in [whatever file the uploader timed out on] on line [###]”
Does anyone know of any easy (not line command) way to increase the execution time? I’ve been doing this for four hours and it’s only to 86 users imported.
I have uploaded all files, the JSON files are all in the proper place.
I have even placed duplicates in the
/import from ning/JSON.
In order to run the importer, you must first use your FTP program to upload the contents of your Ning export into a directory called ning-files in your wp-content directory. The plugin couldn’t find a members file at /home/stormy/public_html/VNC/vampire-nation-concord.com/wp-content/ning-files/ning-members-local.json, which probably means that you haven’t uploaded the files to the right place. Upload your unzipped export to the json directory, and try visiting this page again.
Can anyone offer advice?
Addendum:
How can I parse down the json file for the ning-members-local.json to find it is corrupted.
I managed to get it to read the ning-members-local.json file, but now i am receiving
Created down the line.
Then the message sorry I could not create any accounts.
Any advise?
I had to convert a .csv, to the JSON.
I’m impressed, I have to say. Really not often do I encounter a weblog that’s each educative and entertaining, and let me tell you, you have hit the nail on the head. Your concept is outstanding; the problem is something that not enough people are talking intelligently about. I am very happy that I stumbled throughout this in my seek for something referring to this.
I managed to get this issue fixed.
Turns out my ning archiver did not pull the ning-members.json properly.
Redownloaded and set up a shadow copy of the site.
Tested and confirmed.
Thank you Boone for your awesome import tool
I keep trying to import forum posts but they are not associated with a group and I’m not sure how to import them if they are not – or how to associate them with a group now. is there a workaround? thanks!
Hi Boone, Thanks for this incredible plugin. I am half way through using it but it gets stuck on the importing groups page. It says 0) groups loaded and then there is no ‘continue’ button appearing at the bottom so I can’t go further.
My thought was that maybe i hadn’t completed the Ning Uploading process and had incomplete group and discussion json files. Have you any thoughts about how i can go forward. I think i have to wait another day until i can archive again … I really want to get those group/discussions into site if possible.
Thans
I am trying to revive a Ning network that I ended in April. Finding this script could be a lifesave and enable us revive our beloved site! I have al the complete archive files from the site and have uploaded them all to the ning-files folder as instructed. The network was fairly large (over 2400 members) but I am only really wanting to import the blogs as we will be running mainly a blogging site. Members would be great but not necessary.
When running the importer, it begins the process, it has created some users but then this following message prevents me going any further: Catchable fatal error: Object of class WP_Error could not be converted to string on line 191. I’ve tried refreshing, no go :-(
Any ideas?
Many thanks
Hi,
Thanks for doing this plugin. However, I seem to have run into a problem. I only want to import member information, not all the rest of the crap off the old network as we are starting anew. When I just upload the members directory plus the two members .json files, the plugin does not recognize that I have uploaded them. And yes, they are in the right directory on the server and upload has been set to 777 for the occasion.
Any thoughts?