WordPress.org

Ready to get started?Download WordPress

Forums

How to batch upload users? (2 posts)

  1. converting2wp
    Member
    Posted 6 years ago #

    I'd like to upload a set of user data from a CSV file. Does anyone have any examples of file format and code to do this?

    I can craft the INSERTS to add a single user to wp_users with the correct entries in wp_usermeta, but my PHP/SQL skills aren't quite up to the task of adding 500 users efficiently, so I was hoping to find someone's sample code.

    Thanks.

  2. converting2wp
    Member
    Posted 6 years ago #

    The solution I ended up with is documented at

    http://wordpress.pastebin.ca/483383

    I'll repost when I convert this to php instead of using the shell and phpMyAdmin.

    But thought that might be helpful for other PHP novices to review -- and for you PHP/MySQL experts to comment on.

    My performance fears seemed unfounded --everything (adding users, logging in with 500+ users, finding a particular user to edit) seems pretty snappy. The only piece that was really slow was the piece using the shell - and running that on the server instead of my Windows box made that pretty quick, too.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags