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
Will this plug-in add additional info to already imported members?
Diaan – No, but I’ll work on that.
I’m getting a memory error, unfortunately. Possibly due to the amount of members I have. (~16,000)
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20 bytes)
@Darfuria – It’s almost certainly a problem with the size of your file. For the moment (ie until I come up with a better solution), you might try breaking up the import file into smaller chunks. Open it in a text editor (NOT Excel) and copy some lines into a new file. Make sure that the new file contains the first line of the original file (I think it starts with ‘Name…’) and save it as a .csv file.
Ah yes. I split it into a smaller file and it did the trick. Any way of disabling the auto-email? I’m setting this up as a test and don’t want to e-mail anybody just yet.
Darfuria – Are you running WPMU? If so, then the following line of code should do it:
add_filter( 'wpmu_signup_user_notification', create_function('', '{return false;}') );You’d put it in import-from-ning.php, right before
add_action( "admin_print_styles-$plugin_page", 'bp_ning_import_style' );Just plain’ol WordPress at the moment – not MU.
Darfuria – Haven’t tested this, but it should work. Find the functions.php in your theme dir. (Create it if it doesn’t exist, making sure to include php delimiters <?php at the beginning and ?> at the end.) Then put the following function into it:
function wp_new_user_notification($user_id, $plaintext_pass = '') {return;
}
That’ll override the core function in pluggable.php. Obviously, it replaces the guts of the plugin with nothing, so no email will be sent. Run it with a test email address first to be sure. Then delete it from the functions.php file when you want to run it for real.
I’m looking for the importing data in the oposite direction, ie into my Ning social network.
Is it possible as well?
Eduardo
I have a question. If I use this and some of my members have already made new profiles on my new site will it create a conflict or overwrite anything? I was waiting to pull the trigger on this and while I was waiting some of my members moved over and have setup profiles that may be the same as their ning ones.
ediddy999 – No, the plugin won’t create a new profile field if there’s already one by the same name, and it won’t overwrite the information in a profile field if it’s already populated. It might be a good idea to try a test first, though, if you can.
As ning have announced moving to only fee $$ …and no more free networks Im sure this will be in big demand soon. They say from July.
As I offer 2 free networks the cost of continuing at Ning would be 40-100$/month!
No way yet of recouping any cost from advertising.
Seems cheaper to get a virtual server and run both from there.
Can you show me example of Ning site with over 200 members that have successfully migrate from Ning to Buddypress?
Thanks.
Andrew
andrew – I don’t know of any myself, but you might poke around the buddypress.org support forums to find someone who has done the transfer.
This looks like a brilliant solution! I’m wondering if the import will also bring over other data the members have uploaded to our community, like blog posts, videos, photo albums? Also importantly, will it import group and forum activity?
Can I use your plug-in to import a csv not from Ning? I have a list of students from a university that I want to upload to by WP 2.9.2 and BP (latest version).
All the plug-ins I have looked into are for BP on WPMU or WP where you cannot import Xprofile data.
Do you have a sample Ning export file for me to view (or at least the header/first row) so I can try and adjust my csv to work with your plug-in?
Thanks,
Kalman
Kim – Unfortunately, until Ning offers a content export option, there’s no way to make this tool import stuff like forums. Hopefully soon!
Kalman – Sure, this should be possible. All the plugin requires to run is that the first row in the CSV contain a column header called ‘Name’ and a column header called ‘Email’. All other column headers are sniffed out. As long as the first row of your CSV is like this, it should work. (Don’t have a shareable Ning CSV handy right now so I can’t send to you – but I’m guessing you’ll be able to make it work fairly easily)
Boone Gorges – there is a post here about what I need to do (latest long post on the list):
http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/importing-data-from-excel-csv-sheet
I think this Ning plugin is great and I would be happy to make a $100 donation (or a little more if necessary) if you could tweak it to meet the needs of what I outlined there and then maintain it for a while through the upcoming WP 3.+. Trouble is, I need it very soon…. if you can do it, please email me off-site (you got my email!).
This is for a non-profit in NYC that maybe you can also help with (paid) in the future too — I am not in NY, so I want to help them find a helper, of sorts, for the future who is also based there. I can explain more via email. I know you are a very busy guy. My donation to them is making a buddypress site for their membership.
QQQ
@Boone – I can confirm that creating a CSV, with Name and e-mail as the first two columns (in the first row) and then you other profile fields, will import correctly into BuddyPress.
My next question, which I do not think is related to your plugin, is how do I change the e-mail sent out to users after importing the data?
Any help would be appreciated.
Kalman
I have set up the ning members plugin and tested it. Works great for the general personal info to come over. Is there a way to bring over photos, videos, groups etc.?
ccarini – Not yet, but I believe that Ning is releasing a full-content exporter quite soon. At that point I’ll try to find the time to build a content importer.
Hi:
I’ve found that you can export much of your content as JSON files with accompanying folders. Are you going to be creating some type of importer for BuddyPress to work with these file types and folders?
Ning’s content export tool was released about 3 weeks ago. How can we get these JSON files into Buddypress?
http://blog.ning.com/2010/06/content-archive-tool-coming-soon.html
We are running out of time, and loosing our content would be worse that loosing members. Heck, we are willing to lose like half of our 1,000+ members to gain control over our destiny. ;)
Hi, how can I change the link in the e-mail message that will be sent to the users after importing the users data?
thanks in advance!
Hi Jan – I’m about to come out with a totally rewritten version of the plugin that allows full email customization. Stay tuned – I should have a release version in the next day or two.
If this works flawlessly, I promise to donate a month of ning dues ($20)
Have the new Ning pricing plans opened up any potential for further developing this?
vp, Darfuria, and others – I released a new version of the plugin today, compatible with Ning network exports: http://teleogistic.net/2010/07/import-from-ning-now-imports-ning-content-into-buddypress/. I hope it works for you!
Hi Boone!
I just saw your announcement for the new version of the Ning importer plugin, and I’d like to work with you to make sure it works seamlessly with BuddyPress Media.
We’re just about to start updating all of our new hooks and filters to the plugin, so if there’s anything you need, just post what you’d like added in the issue tracker entry.
Also, if there are any specific content importer functions you’d like us to write and add, we’ll certainly do our best to accommodate you.
Thanks!
^F^
Awesome, F! (Not sure which of the Fs I’m speaking to ;) ) I’m planning on looking at media import in a couple of weeks, and using BP Media as the basis. If I stumble across places where I could use some more hooks or functions, I’ll let you know!
i got this error:
Fatal error: Cannot break/continue 1 level in /…../community/wp-content/plugins/import-from-ning/bp-functions.php on line 196
how to fix it?
Well shit! I just sent out Emails telling several hundred about a website that is supposed to be a top secret test!
Please add a checkbox on the first page to allow people to choose whether or not to send these messages out. I was expecting to be prompted as the first page claims I will be walked through the process.
Now I have to tell the network creator I just scared the shit out of about 500 or so members. :(
Where is the /avatars/ folder located? I would love to give it write permissions… althought i am afraid I may be too late for the import process to add users avatars now that the import process is complete.
Ignore my above overreaction. I got scared because the “Recently Active Member Avatars” widget claimed there were a dozen or so recently active members! I guess the import process makes them “recently active”.
After reviewing the code i now see the Emails only go out by choice at the end of the import process.
Sorry for the overreaction, but you might understand why I was concerned.
Hey Boone:
Should I deactivate all other plug-ins (other than BuddyPress itself) before running the Ning Importer?
We’re getting an error. Allocated 30 MB, tried to allocate over 40.
We’re still getting an error. We put a php.ini file in wp-content and in the importer folder.
Any ideas why we are seeing the memory error?
One more thing…it’s on 1and1. We change the mem limit to 128 in the ini file.
This install of BuddyPress is actually in a folder inside another install of WordPress. We’re using the BuddyPress as a testbed. Could it be that the WP 3.0 version one directory outside of the BuddyPress directory is affecting the memory limit?
I figured it out. You have to make sure all your plugins are disabled and run only the importer. Of course, keep Buddypress enabled. Following the instructions. Getting warnings on every import of comments…seems the data is missing something the importer is calling for on each round. Times out and I refresh and it keeps chugging along. I’m just going to go through the entire process, even with the warnings, and see what happens.
Everything worked, up to this point:
Discussion groups
Import from Ning is now importing your Ning groups. If you’ve got a lot of groups, you might have to refresh the page in order to get them all. If so, you will see a message near the bottom of the screen.
Once you’ve finished importing groups, click Continue at the bottom of the page to move on to the next step.
Fatal error: Out of memory (allocated 23592960) (tried to allocate 15081729 bytes) in /homepages/31/d176735165/htdocs/c2/canary2/wp-content/plugins/import-from-ning/bp-functions.php on line 92
When I start the importer I get this error:
Fatal error: Call to undefined function bp_ning_import_profile_two_markup() in /htdocs/wp-content/plugins/import-from-ning/bp-functions.php on line 42
Any suggestions how to solve this?
regards, Willem
Houston, we have a problem – how to fix this error message?
Make sure that your Ning files are located in the wp-content/plugins/import-from-ning/json directory. You see that message either when the plugin can’t find wp-content/plugins/import-from-ning/json/members-local.json, or when the members-local.json file is corrupt and can’t be opened.
Great plugin, worked like a charm. I used it in conjunction with email user plugin to customize the password email.
My list was 250 accounts. I added my email 1/2 through the import and at the end. The middle came through but the last one didn’t.
This isn’t really a plugin question but is there a way to tell what emails where sent? and re-send the passwords that didn’t get sent? or should I just contact my hosting?
I would recommend a throttle in a new version for shared hosting folks – Thanks very much for all the hard work.
Brian:
Do you have specific experience with the problems with shared hosting? I’m having a terrible time trying to get “Discussions” in. My file size is about 14MB and I’m getting an error. Any ideas as to what to do? We split the JSON file, but that didn’t do anything for us either.
@Zeoli
I am not sure what caused the error. I think it was a relay restriction on the hosting side of things not an error with plugin. It is for a client and I don’t have experience with their host.
Tony – sounds like your discussions file is still too big. 14MB is pretty huge, unless you’re running a machine with gigs of ram. Try splitting it up even further and running it through again.
@BrianRice, @BooneGorges – Okay, we basically removed the original JSON file and only put three discussion entries in it, but the Discussion Groups media folder has a ton of related images. Once we did that, we got another error, which I don’t have copied down at the moment. I think once we parsed the Discussion Group JSON file and resaved it with only 3 entries in it, it went way down to 700KB, but then we got a members error. I think that was it, but I have to check with my developer. We’re going to move the entire thing to MediaTemple on their GS platform, which gives 100MB of RAM off the bat. 1and1 only gives 30MB, even though you can reset it to 256 and increase the max execution limit to 60 using php.ini. I feel like there’s gotta be some larger issue.
Strange that you would have gotten a member error. I’m pretty sure that the plugin is smart enough to remember that you’ve already added all those members, and it should be able to match up discussions with members.
As for any larger problem, I’m afraid the problem may just be very large files and relatively small PHP memory limits. When you take a 14MB file and load it into a PHP object or array, it gets considerably larger (since it’s then structured, so carries additional metadata). So an object that takes up, say, 20-25MB of resident memory on a system with only 30MB allotted to PHP simply won’t leave enough memory for WP and BP to run.
problems….
version 1 imported everyone but only emails and names.
i tried version 2.03? latest anyway, and it stopped part way through
Catchable fatal error: Object of class WP_Error could not be converted to string in /home1/tokyosoc/public_html/wp-content/plugins/import-from-ning/bp-functions.php on line 188
no profile data but emails, name, profile photos for about 70% of users. total users being about 550.
i cant keep running more imports – users not too happy.
another point worth considering is the admin email notification.
most shared hosts will not allow over 500 emails per hour and they are dropped without notification. the import also produces admin notifications – the same number of emails for every user – lots of emails!
there is no pause of option to import a certain number.
andy – Sorry you’re having problems. The “line 188″ error problem suggests that the import function failed for a particular user. It’s possible that the user in question didn’t have an email address or a username in the original data. Try running the import again to see if you get the same error.
Emails to users aren’t sent out until the very end of the process, when you manually click the “send email” button. (That’s different from the first version of the plugin, a change I made because of requests like yours.) So I’m not sure what you mean when you say “users not too happy”.
I know that there are problems with email throttling, but the extra amount of coding needed to set up a pseudo-cron for staggering emails was significant enough that I didn’t do it for this version. It’s possible that I’ll set it up in the next version of the plugin.
Ran version 2.03 again but stopped immediately with the same error.
I also had trouble with the importer picking up other profile field entries and placing them in the initial user list for import. on the 2nd page it of course rejected them as the format was incorrect. maybe the field name characters like () cause trouble … not sure.
I had the emailing problem because I reverted to version 1 which got all the users in, but without extra details. I only saw the v2 email option after just running it now on anouther group – successfully (250 users).
One thing worth mentioning maybe!
The importer changes all the profile fields to text boxes when they were originally checkboxes, radio buttons etc.
Leving it this way, if users input spelling mistakes etc the search results will not be reliable.
I havent seen the effect yet of editing the user fields back to radio buttons or checkboxes – to see how they are displayed or dealt with when previous data imported was converted to text box.
If its a problem then I have to delete all those fields and ask users to redo their profiles.
Simple text box or lager text fields will be ok.
andy – Glad that the import worked for your other group. That almost certainly means that there is a piece of malformed data in the Ning export. In the next version I will set up a filter to make sure that this kind of malformed data doesn’t stop the rest of the process from running. In the meantime, you could try locating the problem yourself by looking to see the last member successfully created, then finding the next member in ning-members-local.json, and seeing if you can remove it or fix the missing profile data that is causing a problem.
As for the text boxes vs radio buttons etc: From the Ning profile data, there is no way for me to tell what kind of select box the original was. In the future I would like to make it possible for the admin to specify, during the import process, what format each field should have. But that’ll take a significant amount of refactoring, so it probably won’t be for a while.
Okay…started running the plugin, got everything in up to discussions, then got a few discussions in, then this: Warning: mysql_get_server_info(): supplied argument is not a valid MySQL-Link resource in /nfs/c07/h01/mnt/102475/domains/netmix.co/html/canary/wp-includes/wp-db.php on line 1582
See this buddypress post about MySql error: http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/mysql_get_server_info-error/
I checked the MediaTemple Knowledge Base. Tried running the script via CGI, but that didn’t work. Put the htaccess file in the plugin directory and that didn’t work.
Here is the Knowledge Base article:
For complex security reasons, (mt) Media Temple’s various hosting solutions operate PHP in what is known as “safe mode”. This is necessary for the safe running of PHP enabled web sites in a shared server environment.
* On (dv) Dedicated Virtual Server systems Safe Mode is turned on by default but can be turned off on a server wide or on a per site basis, please see the Knowledge Base article ” How do I Turn off php safe_mode on an (dv) Dedicated Virtual server”
* On (gs) Grid-Service systems this is turned off by default so you should not have ‘Safe Mode’ issues.
* On (ss) Shared-Server systems this is a global setting but can be configured or turned off on an individual site basis through PHP “Power Mode” Please see our article PHP Power Mode.
Safe mode imposes several limitations that might be causing your scripts to not function as anticipated. Please review the “technical requirements” of your PHP program. If the requirements indicate that scripts must not be running on a safe mode server you should look into the work-around listed near the end of this document.
Some of the major limitations of safe mode are:
* File uploads: since the webserver runs as the ‘apache user’, all files that are uploaded by PHP are owned by apache. This may cause “ownership problems” for many users. In order to use this function, you must create a separate directory inside of your content directory to upload these files into. This directory MUST have the permissions of 777. Also, the manipulation of these files are very limited because of the restrictions below. However, you can delete uploaded files using the “unlink” function.
* File modifications: moving, copying and changing ownership/permissions of files can only be done when they are owned by the administrative user.
* System commands: PHP scripts cannot use the exec( ) and system ( ) functions, therefore shell commands are not allowed to be run from within a php script.
Please note that many “ready-made” PHP scripts, such as Gallery or ***NUKE, use the system () function to copy files. If your script does not work as anticipated it is likely that it uses an unsupported safe mode command and may not work with the (ss) Shared-Server service. Additional information about the safe mode security feature can be found at the PHP official website: http://www.php.net/manual/en/features.safe-mode.php
Customers requiring a hosting solution without the restrictions of PHP safe mode should consider (mt) Media Temple’s other family of hosting products such as the (as) Appliance-Server, or (ds) Dedicated-Server.
Workaround
One known workaround on the (ss) Shared-Server systems is to use an .htaccess file to force your php scripts to run in “CGI Mode” This is only a workaround and as such may not work in every case. If you need to bypass safe mode restrictions because the functionality you are seeking is not allowed with Safe Mode enabled, one available vehicle we offer is to write that component of your system as a CGI. This is allowed because CGI scripts are executed in a much safer context than php.
Another alternative, which consists of running php *as* a cgi while processing certain php scripts. This runs php with safe mode off, but as a separate process and as your user. Your php scripts will take a small performance hit when running in cgi mode compared to running in the ‘normal’ way, so we only suggest using this method on the scripts that need non-safe mode access.
1. Create a directory in which you’ll place your php scripts that you want to have run in CGI mode. For this example, we’ll use ‘phpcgi’
2. In that directory, create a .htaccess file (KB article: What is an .htaccess file) with the following contents:
Action php-script /interpreters/php-script
AddHandler php-script .php AddHandler php-script .php3
Any php scripts that you place in that directory will now be executed by cgi-mode php.
NOTES:
This method may not work correctly with alternate domains.
Once again if your site requires that safe mode be disabled and this recommended workaround does not solve the related issues, you should consider (mt) Media Temple’s more advanced family of hosting solutions such as (dv) Dedicated Virtual servers or (ds) Dedicated-Servers.
The workaround method listed in this document may not work correctly with all scripts or with alternate domains. In that case the most viable options include:
* Rewriting the script as CGI which doesn’t have safe mode restrictions OR
* Upgrading to (mt) Media Temple’s more advanced family of hosting solutions such as (dv) Dedicated Virtual servers or (ds) Dedicated-Servers where safe mode can be disabled
I’m assuming this is probably because of the 14.4 MB JSON file. So, we’re going to try and split it again and see what happens.