This process has been simplified through our Import Users from CSV Add On which works alongside the general Import From CSV WordPress plugin. It still may be helpful to read the notes below to get an idea of how the import works to add members.


This is an oft-requested feature, and we’ve written an Add On to facilitate Member Import. The steps below were written prior to that Add On and document a manual method that interacts directly with your database.

  • Step 0 I suppose is setting up your membership levels using the plugin. It will help to know what levels you have in advance.
  • Step 1: Setup a CSV file with your users name, email address, and other meta data. Use a plugin like (Import Users from CSV) or (User Meta) to import the users into WordPress. Possibly use a meta field to differentiate membership levels for each user if you have more than one membership level or a combination of non-member and member users.
  • I haven’t personally used either of these plugins. I would test these out and any other that come up for “import users” in the WP repository.
  • Step 2: Add users to a membership level. This can be done in bulk by running queries on your database. Use phpMyAdmin or MySQL to run queries like this: (backup the DB, and make sure you alter these to work on your site)
  • #add all users to level with id 1
  • INSERT IGNORE INTO wp_pmpro_memberships_users (user_id, membership_id, startdate) SELECT ID, ’1′, now() FROM wp_users
  • #add users with a meta field of membership_level set to whatever id is in that field
  • INSERT IGNORE INTO wp_pmpro_memberships_users (user_id, membership_id, startdate) SELECT user_id, meta_value, now() FROM wp_usermeta WHERE meta_key = ‘membership_level’

And some more:

  • To add end dates to the memberships you import:
  • (1) make sure you add a “membership_enddate” meta field to the users with the format YYYY-MM-DD. You should be able to add a column to your import CSV and import it via those plugins.
  • (2) Run this query AFTER you run the earlier ones to insert the membership levels.
  • UPDATE wp_pmpro_memberships_users mu, wp_usermeta um SET mu.enddate = um.meta_value WHERE mu.user_id = um.user_id AND um.meta_key = ‘membership_enddate’
  • That should do it.
  • Check out these MySQL docs with explanations on how I came up with those queries. Again, I didn’t test them.
  • This post did an INSERT … SELECT to insert items into the membership table using values from the usermeta table.
  • This post does an UPDATE JOIN to update two tables at once… or really we update the one table using values from the other.

And some more:

Ok, by email, you asked me how to then send all these new users a notification email. This code should work. This is untested. Please backup the DB and code before running this. And be sure to test it on a smaller # of users by tweaking the $user_ids array.

And finally, a nice testimonial

from PMPro member HarnessTech that includes from info on how he did his export/import:

I just had to stop by and say how wonderful this thread is. I used AMR Users on my old site to export my existing users, then I tweaked the CSV as needed and made the levels and end date modifications as suggested above. Then I imported into the new site using User Meta Pro (VERY awesome plugin) and used the MySQL calls above to get things in order. Incredible!

Note that I have 844 members.

Thank you, Jason, for a great product and excellent customer support.

This entry was posted by Jason Coleman in Recipes and tagged . Bookmark the permalink. Last updated: June 28, 2012. Titled How to Mass Import Members into WordPress/PMPro

Comments (21)

huh? I am completely lost I have users registered and want them to now show in the plugin but they are not appearing in the users directory for paid membership pro

So will this set up a schedule with Authorize.net (or whatever gateway you’re using) for the new members that were imported? Let’s say that I’m moving users from one system to another, the pricing is all the same, but I want the past users to remain on the same payment schedule as before and want it to be automated through Authorize.net. (as if they signed up fresh in the first place.) Does this make sense?
Thanks for your help Jason.

So, what I’m reading and understanding is that we import users into WP users db with the user data and then import info (with matching id #) into wp_pmpro_memberships_users. Is that the reverse option of the Export CSV file from the members list in PMPro?

That code is a plugin. You can tell by the comment section up top with /* Plugin Name: PMPro Import Users from CSV … */ Download the file and place it in your /plugins/ folder, then activate it from the Plugins page in the dashboard.

I’m pretty sure any column that doesn’t have a specific match is saved as user meta. So you should be able to add baddress1, baddress2, bcity, bstate, bzipcode, bphone, etc to your import.

I’m having problems with the upload, when I upload a .csv file it hangs up, then when I check the users, it only uploaded one record. Any ideas on what could be causing this? Do you have a sample CSV that I can see to make sure I am formatting correctly.

Try the sample CSV that the Import Users From CSV plugin provides on the upload page. And try uploading without the member fields set. Some hosts (especially shared) will have trouble with the import in general. Look for the troubleshooting tips for the Import Users From CSV plugin. The same tips apply when importing the member stuff as well.

I have been using this succesfully (thank you!), but the Import Users from CSV plugin by Ulrich Sossou has now completely stopped working for me (It has not been updated in over 2 years and I have had to deactivate it as it was causing problems on the website). Can you recommend another compatible plugin to do this job? Thank you.

Is there ANY solution for importing a csv file of existing members? I have tried every recommendation posted on your site, using every add-on and plugin, no to avail. It seems kind of strange (and non intuitive) for a paid extension like this to have not been designed without some simple way to import existing members. We are really feeling like we wasted our money on this product. This is nuts!!

Absolutely – you can use the Import Users from CSV add on. Can you open a topic on the members forum to explain what you are looking to do? Our support team will follow up directly in your support thread.

Leave a Reply

For faster support related to issues on your specific site please open a ticket in our members support area.

Your email address will not be published. Required fields are marked *