There are different approaches to importing users into a WordPress site. The simplest method is to use a plugin. We have had success with the “Import and export users and customers” plugin.
The plugin allows you to import users from a CSV file and include custom meta fields (which any custom field created by WP-Members or any other plugin is).
One thing I like about this plugin is that it not only imports new users, you can use it to update existing users. Here’s an example of where this works well.
Suppose you have a current WP site with existing users but you are adding WP-Members and will be using something like the PayPal extension (which applies an expiration date as a meta key). You can set up an import to bring in new data (i.e. the expiration date) for the existing users using this plugin.
Here are some important things to note about using the “Import and export users and customers” plugin:
- Make certain that the heading of your CSV file identifies the fields you are importing.
- Make certain that the heading values are the meta keys of the fields!! This is important. The data will be saved using the key that is identified in the header (first) row of the CSV file. If this value does not match the meta keys for the fields you have set up or created in the WP-Members fields tab, you’ll have a mismatch and it will appear that no data has been imported. Important exceptions to this are the “username” and “email” fields. These MUST be the first two columns and you MUST use those values in the header (username and email). ALL other fields should be set using the meta key for the field (see the Fields tab to look up what these are).
- Make sure that users are imported to the correct role. Most people leave defaults intact for both WP and WP-Members, which means the users will be given the “subscriber” role. However, if your users need to be a different role and/or a custom role, make sure to set this correctly for the import.
- Make certain that you have checked the appropriate email setting for import. If you don’t want to be sending emails to users, make sure to uncheck these values.