• Wordpress — batch import users

    I am setting up a new WordPress-driven site, and will need to import batches of users.  I found a script from Dagon Design that provides most of what I need.  But their script sends a copy of the new user notification to both the site administrator (not needed as the administrator is probably the one creating the users) and sends a copy of the new logon info to the user (also not needed because we are doing this ourselves with a email merge at a later time.)  So I made some updates to the script making these changes — and while I was at it I added the option to add some intro text to the user email in the case you do use this option.

    The plugin defaults to send the user an email unless you select otherwise.  My normal preference is to default actions to NOT happen unless the user explicitly decided to do them — avoids embarrassment if a check box is missed.  But in this case the plug-in was already doing the action, so it seemed more in keeping with the original functions to do make doing the action the default.

    Here is the modified version of the script.  Change the extension to php and upload it into your plug-in directory.  In the admin menu look under tools > import users to use it.

    dd-import-users

    And here is the original plug-in information:

    Import Users Plugin for WordPress · Dagon Design

    This plugin was created for people who need to easily add multiple users to their WordPress installation. Simply give it a list of usernames and email addresses, specify the role of the users (subscriber, author, admin, etc.) and it does the rest.

    Related Posts

    Tags: , , , ,
  • Author: Randy

    In my day job I serve as Information Technology Director for the Yale School of Drama. Otherwise I garden, play guitar, build stuff out of wood, take photos, play around with technology and have been blogging since 2003.

    Share on: LinkedIn

    Stay Informed!

    Did you enjoy this post? Then subscribe to my email newsletter and have the daily posts delivered directly to your inbox. Enter your email address here:

    Comments / 5 COMMENTS

    [...] Import Users Plugin for WordPress is a small little plugin by Yoast that would allow you to import the users from a CSV. Though it does it job okay, I needed a slightly different thing, so I used a slightly modified version by Rodeworks. [...]

    Moving a Multi-Author Blog Authors : Import-Export Users | Fili's tech on May 18 09 at 8:28 am

    Thanks for the additions to your script… and not a day too soon! I needed to import a bunch of users from a csv file to a new wordpress site and being able to add my own message and turn off admin emails was a welcome addition to an already great DD script. Because of your addition, I was able to further add a line that changes the default “From Wordpress” so it came from our site.

    David added these pithy words on May 04 09 at 5:21 pm

    Terrific improvements to an already life-saving (or at least work-saving) script.

    I got a fatal error when I tried to implement your changes, though:

    Parse error: syntax error, unexpected T_STRING in /home/shem/public_html/wp-content/plugins/dd-import-users.php on line 41

    Any ideas on what’s causing it?

    Thanks,
    L.

    Lila added these pithy words on Oct 20 09 at 10:52 pm

    No sorry — it worked for our needs as posted there. But it has been a while since I’ve looked through the code — I’ll take a look over the course of the next couple of days and post if I find anything.

    Randy added these pithy words on Oct 21 09 at 8:33 am

    I’ve created extra address fields in the user profile page which is stored in the usermeta table. Any idea how to import the address for each user?

    Thanks

    Michael Krapf added these pithy words on Mar 09 10 at 11:18 pm

    ADD YOUR COMMENT
    Comments are moderated.

Welcome to RodeWorks

Randall Rode's online home for thoughts, notes, and experiments with a wide range of technology topics. Visit the about page for info on my recent projects and professional background. I welcome your comments!

  • Recent Comments

  • Coming Soon

    Open Source Way in creating community

    March 17, 2010

    Drupal 7 promises big UX improvements

    March 17, 2010

    Site Topics