Welcome to Dagon Design. In addition to free scripts, WordPress plugins, and articles, we offer a variety of services including custom theme design, plugin creation, and PHP scripting. Contact me for more information.

Version 1.2   Updated Thursday, February 19th, 2009 at 7:19pm

Import Users Plugin for WordPress

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. It will automatically email each user and give them their randomly generated password, or let you specify one. It also has validation in place to make sure the usernames do not already exist, that the email addresses are not already in use, that the usernames are valid, etc. After it processes the information, it tells you how many were added, and upon error, gives you the reason why each failed.

Download

  If you have found this page useful, please consider donating. Thanks!

Changelog

  • 02-19-09 Version 1.2 – Updated modified version with contributions by Robert McKenzie (Thanks Robert!). Changes include the ability to specify a password, as well as first/last names.
  • 06-12-07 – Modified version by Nicholas LaRacuente added (download link above).
  • 05-03-07 Version 1.1 – Updated to take advantage of the customizable roles feature in WordPress 2.1. This update was contributed by Tom Ransom.
  • 08-06-06 Version 1.0 – First release.

Instructions

  • Download the above file, rename it from .txt to .php, and upload it to your plugins directory.
  • Enable the plugin.
  • Use it by going to ‘Settings -> DDImport Users’

Usage

The userdata is entered in the following format:

username|firstname|lastname|password|email|role
username|firstname|lastname|password|email|role
username|firstname|lastname|password|email|role
etc…

To clarify, that is one user per line, with a pipe character between the values. Extra whitespace and empty lines are trimmed automatically. Be sure your data is entered properly! If you do not want to assign a password, first name, or last name, just do not enter them. The field separators are still required. Example:

username||||user@domain.com|

After you have added your user data, you can choose the role for the users with the drop down box. The choices are: Subscriber (default), Contributor, Author, Editor, and Administrator.

If the password is not specified, one will be randomly generated. In either case, the password is emailed to the user.

Pages: « 9 8 7 6 5 [4] 3 2 1 » Show All

  1. Sweet Baby J. Thanks for your edits to the plugin, Robert!

  2. Thanks to everyone for their contributions. This does the trick for me.

  3. 58
    Manvryn

    Hi,
    Just to let you know that I installed Robert’s modified version and it works perfectly with WP 2.7

  4. Sorry, just a correction to the link .. it should be:

    http://www.gammaray-tech.com/scripts/dd-import-users-mod_wp27.txt

    Cheers!!!

  5. I’d like to submit another modified version of this great script. The changes I’ve made to the script allows for adding first and last names, setting a password and setting the role for the imports. I’m also using the more powerful method of account creation, “wp_insert_user” this allows a lot more in the way of adding nice things to the script and new account.

    The import file or manually entered format is:

    username|firstname|lastname|password|email|role

    All fields except username and email are optional, but all fields must be delimited, ie:

    fred|Fred|Rivers|mypassw0rd|fred@rivers.com|Editor
    sam|Sam||sam@mypress.com|

    Fred has everything assigned while Sam will be emailed his generated password and his role will be set to whatever was selected from the drop down box on the form.

    I’d be interested in any comments on my changes. There have been quite a few changes, I suggest a diff of mine and the latest modified one.

    My modified version can be found at:

    http://www.gammaray-tech.com/scripts/dd-import-users-mod_wp27.php.txt

  6. @Casey Lessard,
    I forgot to say that this version is only tested on wordpress 2.6.x

  7. @Casey Lessard,
    I’ve created such an enhanced version from the modified version above. It allows:

    username|firstname lastname|email

    The ‘firstname lastname’ can also be omitted if appropriate e.g.:

    jbloggs||jbloggs@xyz.com

    You can get it from: http://linuxcentre.net/wordpress/bulk-user-registration/

  8. I really want to use this plugin, but I would like to import first and last names (and perhaps other fields, but those especially) also. Is it possible to modify it to do so, and what changes do I need to make to make that happen?

  9. D’Arcy I would love to get a hold of your modified modified version. I work in a school district of 68,000 students where this could be useful. I use the unmodified version and tell blog admins to deal with the existing user and would love to not worry about it. Thanks.

    Thank you to Dagon Design, your plugin has saved me hours.

  10. I’ve modified the plugin (actually, the modified plugin…) to support gracefully handling existing usernames and email addresses on import. I’ll do some more testing, and can share my minor edits if anyone finds them useful.

  11. This plugin is REALLY handy. Thank you SO much. I’m using it on a campus blogging service, and the profs are using it to batch enroll students to the class blog.

    One thing they’re finding is that if a student already has an account on the WPMU site (another course, or individual blogs, etc…) that the import process fails.

    Is there a way to handle the case of a user account already existing?

  12. It actually uses the built-in WordPress functions to send the email. The same email that is sent when a user registers the traditional way. So to do this, you would have to find where in the WP core files the wp_new_user_notification is declared and modify it there.

  13. Hi there!
    Thanks for the plugin! How do I modify the activation reminder email sent? I wanted to change the format and wording of it. Please advise. Thanks again.

  14. 47
    Stepsel

    Can this plugin be used in WP 2.5.n ?

  15. 46
    Minstrel

    I am trying to bulk upload around 5000 users. I have disabled the feature that sends the email as it is not required. The usernames, passwords and emails were added successfully but the passwords don’t seem to work unless I reset them using the Wordpress Web interface.
    Is there a way to login to Wordpress without resetting the password?
    Would appreciate some help on this.

Pages: « 9 8 7 6 5 [4] 3 2 1 » Show All

Leave a Comment

Before you comment: If you are having an issue with a script, please make sure you have read the entire article. Also, please read through the comments because most common issues have already been discussed many times. Thanks.


Be sure to wrap all code in <code></code> tags.