Import Members From CSV is a Paid Memberships Pro Add On that allows you to create new users and update existing users by importing a simple CSV file.
Use the import process to create users, assign membership levels to new or existing users, and update subscription information.
Migrating from another membership platform or an offline system? Your import can even preserve existing payment information and active subscriptions.
In This Guide
Installation
You must have the Paid Memberships Pro plugin installed and activated with a valid license type to use this Add On.
- Navigate to Memberships > Add Ons in the WordPress admin.
- Locate the Add On and click Install Now.
- To install this plugin manually, download the .zip file above, then upload the compressed directory via the Plugins > Add New > Upload Plugin screen in the WordPress admin.
- Activate the plugin through the Plugins screen in the WordPress admin.
How to Import Members
The import process involves two important steps: prepare your import file (CSV) and process the import. Refer to this section of the docs for help adding the correct CSV headers and data for your import.
Prepare Your Import File
Download the template here (import.csv.zip) to use as a basis for your data for import file. This template does not include every field you may need to import and may also include fields you do not need to import.
You can also access a starter import template file within your own site. Navigate to Users > Import Members in your WordPress admin. You’ll see a link to download the example CSV file from this page.
There’s a full list of required and optional import fields in the documentation sections below.
Processing the CSV Import
Once you’ve got your template set up, you can proceed with importing members.
- Navigate to Users > Import Members in the WordPress admin to confirm your import settings
- Select the Import File (.csv).
- Notify Members: Check this box to send new users an email with their username and a link to reset their password.
- Update Existing Users: Check this box to update existing users when a matching username or email address is found (recommended).
- Process With AJAX: Check this box to process the import in batches using AJAX (recommended, especially for large member lists).
- Skip Existing Members: If you suspect your CSV has duplicate records for existing members, check this box. This selection will skip changing the membership level of users with the same active membership level during import.
- Click the Import button.
The import will run as soon as you click this button and log any errors during the process. If you are processing via AJAX, the screen will keep your updated on the import’s progress.
Safety Tips for Importing
We recommend testing the import with a portion of your data or with testing data until you can confirm your CSV is properly formatted.
Once you can trust your spreadsheet format and confirm that the correct and complete data is imported, try a smaller segment of your actual data.
For larger CSV files, always choose the Process with AJAX setting. This lets the system process the import in batches, with a default batch size of 50 imports per iteration. To adjust this default batch size, use the pmprocsv_ajax_import_batch hook
.
Hire a Developer For Import and Migration Service
We have a list of developers that specialize in membership site data import and migration services. If you would like to hire someone to support your migration, we recommend ExpressTech.
Contact Ravi at [email protected] or set up a call via Calendly.
Import CSV Headings (Required and Optional)
Below is an explanation of the column headings and what they mean. While most fields are optional, you must import the user_id
, user_login
, or user_email
field to match and update existing user information via import.
WordPress User Columns
- user_login: The unique username for this user.
- user_email: The unique email address for this user.
- user_pass: The password to set for this user. We do not recommend importing passwords.
- first_name: The user’s first name.
- last_name: The user’s last name.
- display_name: The desired name that displays for this user when reference on the frontend or backend of the membership site.
- role: The desired user role for this user. Leave blank to set to site default for newly imported users. We highly recommend keeping the role set to “subscriber”.
Any other fields we detect in the import file will be imported as usermeta
.
PMPro Membership Level Columns
The only field required to give a user a membership level is membership_id
, but it’s best to fill out as many fields as possible. By adding more fields, you also import the correct “subscription price” (shown on the Membership Account page) for imported members.
- membership_id*: Membership numerical level ID of the user’s membership level (not the level name). Navigate to Memberships > Settings > Levels to obtain your site’s level IDs. Note: Importing the value “0” will cancel all of the user’s existing memberships.
- membership_initial_payment: The initial payment for the user’s membership level (the amount collected at checkout).
- membership_billing_amount: Specifies the billing amount for the user’s membership level, such as ‘250’ for a level billed at $250 per year.
- membership_cycle_number: Specifies the billing cycle number of the membership level, such as ‘1’ for a level billed once per month.
- membership_cycle_period: The billing cycle period. Possible values are “Day”, “Week”, “Month”, and “Year” (without the quotes).
- membership_billing_limit: The billing cycle limit for the user’s membership level.
- membership_trial_amount: The trial amount for the user’s membership level.
- membership_trial_limit: The number of cycles the trial should last for the user’s membership level.
- membership_status: The status of the user’s membership. Possible values: active, inactive
- membership_startdate: The member’s start date. (formatted as
YYYY-MM-DD
) - membership_enddate: The date membership expires and is fully cancelled. (formatted as
YYYY-MM-DD
). You should only import an end date for members that should fully expire and cancel. Do not set an end date for a member with a lifetime membership or an active recurring subscription. - membership_timestamp: Date to use for the timestamp of the order we generate on import. Generally the last payment date for the member. (formatted as
YYYY-MM-DD
) - membership_code_id: Discount Code ID (if used) found on the Memberships > Discount Codes screen in the WordPress admin.
*required to assign membership levels
Importing Multiple Memberships Per User
If you have multiple membership levels to import for the same user, you can use this import tool by following these steps:
- Create duplicate rows in your CSV for each membership level you need to import for the same user.
- You can only import additional membership levels for level groups that allow multiple levels within the group (you cannot import two memberships for levels in a “one per” level group).
- Additional rows of data for the same user will overwrite their WordPress user fields, including custom user meta fields and billing fields.
We recommend first importing all the users without any membership details, then run a second import for the membership information. In this second import, remove all unnecessary user information (password, role, name, custom user fields). You only need the user_email
field to match the existing user (from the first import) to the membership data import.
Maintaining Active Subscriptions
For sites that want to continue or update an existing subscription, your import file must contain the membership_subscription_transaction_id and membership_gateway fields.
Without these fields, PMPro’s gateway integrations will not know which user to attach a new incoming gateway message to (new order, failed payment, subscription cancellation).
PMPro Subscription Columns
- membership_subscription_transaction_id**: The gateway’s Subscription Transaction ID (required) if you want to continue or update an existing subscription. You can find this data on the Memberships > Orders page in the WordPress admin.
- membership_gateway**: The Payment Gateway for the user’s recurring subscription. Possible values are “check”, “stripe”, “paypalstandard”, “paypalexpress”, “paypal”(for website payments pro), “payflowpro”, “authorizenet”, and “braintree” (without the quotes).
- membership_payment_transaction_id: The gateway’s Payment Transaction ID (optional). You can find this data on the Memberships > Orders page in the WordPress admin. This field is useful as a reference for a user’s last payment made between the site and your gateway. For import, you set this to the last single transaction ID received as part of the users’s subscription.
- pmpro_stripe_customerid: If you are using the Stripe gateway, include this column in your import.
**required to update recurring subscription
Migrating From One PMPro Site to Another
For this setup, you can export the Gateway and Subscription Transaction ID for your members from the Orders list.
- Navigate to Memberships > Orders.
- Select Show > Within a Status > Success.
- This will allow you to export the last successful order for all active memberships. The orders export file includes the membership_subscription_transaction_id and membership_gateway fields you need for the import file.
Migrating From Another Platform to PMPro
If you are trying to import and maintain active subscriptions from another platform, you need to locate something in the system that connects a user’s email to their subscription ID.
- For PayPal, this begins with
I-
- For Stripe this begins with
sub_
If you are migrating from WooCommerce Subscriptions, you cannot preserve existing subscriptions because Woo Subs does not use real gateway subscriptions (they trigger all payments as individual charges). There is no way to convert these one time payments to subscriptions through an import.
Import User Custom Fields
- You can import any custom field that you have added to your WordPress site using Paid Memberships Pro User Fields.
- You can also import custom fields for other uses on your site, such as customer data for WooCommerce.
To import custom fields, add additional columns to your import file where the column name is the unique meta_key
used for your user field.
Member Address Import
Paid Memberships Pro used to store a member’s billing address in user meta. In the current version of PMPro, we only store billing information on the individual membership orders.
You can still import a member’s address information to user meta, but it will not be used by the plugin to show their address on orders in the admin area or frontend order screens.
If you want to import a member’s address, create the user fields then import then as additional columns just as you would any other user field data. For example, here are some fields to show how you would import a member’s home address.
Note that you must also create these fields with the exact same field names as the column headings in the Memberships > Settings > User Fields screen in the WordPress admin.
Column Heading | Field Description |
---|---|
member_address_firstname | First Name |
member_address_lastname | Last Name |
member_address_address1 | Address Line 1 |
member_address_address2 | Address Line 2 |
member_address_city | City |
member_address_state | State |
member_address_zipcode | Postal Code |
member_address_country | Country – this should be one of the country codes found in includes/countries.php |
member_phone | Phone |
Screenshots
Action and Filter Hooks
apply_filters( 'pmproiucsv_required_import_headers', array( 'user_email' ) )
Define the required headers for a member import CSV file.
apply_filters( 'pmproiufcsv_cancel_prev_sub_on_import', false );
The filter is, by default, set to false
. This prevents the import process from cancelling existing subscriptions at the gateway. To change the default behavior, add a custom function to this filter hook and return true
. This change will cancel subscriptions at the gateway during the import process if the member’s level changes or is cancelled.
apply_filters( 'pmprocsv_ajax_import_batch', 50 ),
Adjust the number of imports per iteration. Default is 50 imports per iteration.
do_action( 'pmproiucsv_after_init' );
do_action( 'pmproiucsv_import_page_inside_table_bottom' );
do_action( 'pmproiucsv_import_page_after_table' );
do_action( 'pmproiucsv_pre_user_import', $userdata, $usermeta, $user );
do_action( 'pmproiucsv_post_user_import', $user_id );
do_action( 'pmproiucsv_post_users_import', $user_ids, $errors );
This is a Plus Add On.
Plus Add Ons are included in all Plus or higher premium membership plans.