Import Members into WordPress Ultimate Member from CSV File

The Ultimate Member plugin is a formidable package for managing membership on a WordPress site. Surprisingly, however, it does not have a built-in way to import members through CSV file or other method. But, you can still do it using the method I describe here.

Install the “Import Users from CSV” Plugin

The first step (after installing Ultimate Member, of course), is to install the Import Users from CSV Plugin.  Yes, it says it hasn’t been updated in over two years, but it worked great for me anyway.

Create Your Preliminary CSV File Template

After activating the plugin, go to Users -> Import from CSV and click the link to download the example CSV file.  Use this as a starting point to create your CSV template.  If you have other fields you want to import, add new columns with the Meta Key for that field in the first row.

To find a Meta Key for an Ultimate Member field, you can go to Ultimate Member -> Forms -> Registration Forms, then click on edit button for the field you want to add.  The Meta Key field will be there.

Repeat for all of the Ultimate Member fields that you want to add.

Populate Your CSV File

The next step is to populate your CSV file with member data. Either copy it into your template CSV, or reformat your existing member CSV to fit the format of your template.

There are some very important steps to take when doing this:

  1. Certain fields are required such as user_login and user_email.  Make sure these are not blank!
  2. Make sure there are no duplicate usernames or email addresses, or the import will fail part way through and you’ll have to clean up the mess.
  3. Passwords (user_pass) might not be required, but I always add them anyway.  If I don’t have passwords, I generate them arithmetically in Excel based on other fields. Note that they will be encrypted before being written to the database, as with other WordPress passwords.
  4. For the “role” column, I use “subscriber” to give minimum WordPress privileges to members.
  5. Create a column with title “MembershipStatus” and populate it with “Yes” for all members. This is used by Ultimate Member.
  6. VERY IMPORTANT: If you have any fields which are validated as URLs, make sure to include the “http://” or “https://” before the domain name, or else they won’t validate after entry and you’ll have to add them manually to every member!

When you’ve taken care of all of these issues, and made sure there are no invalid fields in your spreadsheet, export it as a CSV file if it is not already.

Check Ultimate Member Field Validations

At this point, you should double-check what kind of validations you have set for your Ultimate Member fields to make sure they match they type of content you have in your spreadsheet.

One type of field that might trip you up is email address. Ultimate Member has a validation setting called “Unique Email” for email addresses.  This not only makes sure the email address is a valid address, but also that it is unique within this WordPress install.  That means the import will fail if there are any duplicate email addresses in this field.  That is what you want if the email address is the user’s primary email address, but it might not be what you want if the email address will be duplicated between members.

Think about this carefully and set your Ultimate Member form validations accordingly.

Set Notification Preferences

I learned this lesson the hard way, but one super-important thing to do before uploading is to think about Ultimate Member email notifications.

Go to Ultimate Member -> Settings -> Emails and turn off any email notifications that you don’t want to go out during the import process.

ultimate-member-admin

Upon import, users will be in the Pending state. Think about whether you want to move them to Approved yourself, or if you want them to get an email prompting them to do it, and set your email notifications accordingly.  This is a very important step!

I forgot to do this, and I had to re-import a few times.  This resulted in hundreds of emails going to confused members who thought their memberships were canceled and so forth.  Please don’t make this mistake!

Do a Test Import

The most prudent thing to do at this point is to make a backup of your site, and then do a test import using your spreadsheet template and a few dummy users. Go to Users -> Import from CSV, and import the dummy CSV file.

Do the import and make sure they are imported into Ultimate Member correctly.  If not, go back and fix what failed.

This is also a good time to make sure the email notification settings you chose are what you really want. Check to see if the appropriate emails got sent (or not sent if that is the case).

Do the Real Import

Okay, you are finally ready!

Go to Users -> Import from CSV.  There are three check boxes related to notifications and so forth that you should carefully consider before proceeding. Once they are set accordingly, upload your CSV and go!

If successful, all of your imported members will be in the Pending state. You should have already decided previously whether you want to approve them manually yourself, or have an email notification go to them.

Okay, that’s it. Bulk importing members into Ultimate Member is a somewhat tedious process that needs to be done carefully. But hopefully, you’ll only need to do it once!

Let me know if you have any other tips regarding this. Let me know how your Ultimate Member import experience went as well! – Brian



19 thoughts on “Import Members into WordPress Ultimate Member from CSV File

  1. Great instructions. I struggled with the passwords, as the current version kept using a different encryption that my site if I imported as user_password. if i used user_pass as the column heading, it imported the clear text. Solution – set up a user with the default password you want, go to the DB and copy the encrypted version of the password – past that into your CSV file in the user_pass column, and the clear text of the encrypted password is imported and then works on the site.

    Now, I’m still not allowed to import multiple users with the same email. I need to do this because I’m bulk importing and don’t have emails for everyone. I noted your comments above about UM Form Validations, but so far, I’ve been unable to find these settings (at least not at the field level.) I’ve edited the default UM forms, and the user_email field on those forms to require “No Validation” but that doesn’t seem to have worked. Any further suggestions on how to configure to allow for multiple users with the same email (but a unique username) would be much appreciated.

    1. Update – after reading lots of other articles, I think WordPress prevents duplicate email addresses. However, you can import data with a blank email as long as you have a unique username, which meets my needs. thanks again for the helpful article.

  2. Great article! Thank you very much!

    I have one suggestion and one question :)

    The suggestion is that you can probably automate the approval process by using a column “account_status” with value “approved” (haven’t tried it, but I see the meta field in the database)

    And my question is, have you found a way to import Profile Photo? Seems like passing an URL won’t cut it..

    1. Hi Alexander,

      Thanks for your comments! I think your first idea should work, although I haven’t tried it.

      I’ve not found a way to import the profile photo; that could be tricky since the URL of media files usually have the year/month in the URL… Sorry, I don’t know of a quick solution. If you find one, please let me know and I’ll post it.

      Best,
      Brian

  3. Thanks for your article, it is a help resource. I have a question though. You mentioned adding a column for ‘Role’ and setting it to subscriber. How does one set a persons status as Admin or Member on import? How should that column be labeled?

    1. Hi Stephen,

      I believe the row title and fields should match what is in your database. So, use phpMyAdmin or a database viewer plugin to see how the database fields are labeled and label the spreadsheet the same way.

      Best,
      Brian

      1. I’m using godaddy WP hosting and using their starfield mysql admin, I’m not able to find the db so I can see the UM tables and make sure I’m loading the correct fields. Any suggestions on how to do this.

  4. Hi Brian –

    Thanks for the great info!

    Do you happen to know how I can change the default email that’s sent to members by the Import? The one that’s there is quite terse and unfriendly. I’m moving my membership from Salesforce to WordPress and I’d like the initial email to say “Welcome to our new website”, and “Here’s how you log in”, and so on.

    Any idea how to do that?

    Thanks!

    Mike

  5. Hi Brian, does this work for updating existing user memberships as well? For instance, My business is a certification body. I plan on having a “candidate” membership to the site with access to A materials. Once a user passes an off site certification test, I need to upgrade their membership to “Certified Member” with access to A + B materials. This process would be automated. Will importing the new data create new users or update them?

  6. I am wondering why the profile images are not loading after import. What is the metakey for profile images? I’ve tried these so far: profile_photo, um-profile-photo-img, um_profile_photo_img, .um-profile-photo, .um_user_avatar, um_avatar, um_avatar, um-profile-photo, um_profile_photo and user_avatar_small. None of these seem to work so far. Brian, am missing something?

    1. This was bothering me, too. Found out that the photos are kept in the images folder of the media library. A unique folder for each user labeled with the user id# is created when the user uploads through the profile entry interface, and several sizes of he photo are created in that folder. So, there is no meta key, unfortunately. Does make it harder to import!

Leave a Comment or Ask a Question

This site uses Akismet to reduce spam. Learn how your comment data is processed.