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. This plugin had been somewhat abandoned but I’m glad to report that it’s now being maintained again!
Create Your Preliminary CSV File Template
After activating the plugin, go to Users -> Import from CSV (or Tools -> Import users from CSV if you’re using the newer plugin) 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.
If you want users to have multiple roles, you can separate them with commas (thank you to reader Nick D. for that info!)
To find a Meta Key for an Ultimate Member field, 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:
- user_login is a required field, so make sure it is unique and not blank!
- Email address is actually not required, but it’s a good idea to have it unless you have a specific reason not to.
- 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.
- 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.
- For the “role” column, I use “subscriber” to give minimum WordPress privileges to members.
- Create a column with title ” account_status ” and populate it with “approved” for all members. This is used by Ultimate Member.
- 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- Important!
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.
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 staging copy of your site, and then do a test import using your spreadsheet template and a few dummy users on that offline staging copy. 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 checkboxes 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 Approved state. However, in my latest testing, the role assigned to the imported members was only Subscriber. We need to add “Member” to that also.
Add the Member Role
To add the “Member” role to the imported users, go to Users and select all of the users that you’ve imported. Then click the UM Action pulldown and select the Ultimate Member status that you want to assign to the imported users.
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