How it Works
Import Users From CSV is a WordPress plugin that allows you to create new users and update existing users by importing a simple CSV file.
This Add On extends the functionality of the Import Users From CSV plugin, allowing you to automatically assign membership levels to users at import, update subscription information, or migrate and continue existing subscriptions simply by adding a few columns to your CSV file.
Installation
- Install and activate Import Users from CSV.
- Install and activate the Import Users from CSV Integration Add On.
- – To install this plugins manually through FTP, download the .zip files above. Unzip and upload the
pmpro-import-users-from-csv
andimport-users-from-csv
directories individually to the/wp-content/plugins/
directory of your site.
- – To install this plugins manually through FTP, download the .zip files above. Unzip and upload the
- Activate the plugin through the ‘Plugins’ menu in WordPress.
How to Import Users to Your Membership Site
Once you’ve got your template set up, just import it like you normally would with Import Users From CSV. Be sure to save the CSV as MS-DOS format.
- Go to Users > “Import from CSV” in the WordPress admin.
- Configure your options.
- If you would like to update existing users, make sure the “Users update” checkbox is checked.
- If you suspect your CSV has duplicate records for existing members, check the box to “Skip existing members”. This tells the import tool to skip over members with a current membership level and is particularly helpful for large CSV files that include duplicates.
- Click the Import button.
- If you have existing subscriptions hitting an old IPN or Webhook URL, you may need to use custom code like this to redirect that traffic to the equivalent PMPro URL.
- If you want to send a welcome email after a user has been imported, you can use this custom code example.
CSV Import Template
Download the template below to begin formatting your data for import.
Note: If you have any unused column headers after filling out the template, delete them or your import will fail.
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. Repeat imports can cause orphaned data or accidentally cancel subscriptions. If you are updating existing users, it may be best to run SQL queries directly in your database by following the guide here.
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 contact@expresstechsoftwares.com or set up a call via: https://calendly.com/ravisoniets/meetwithravi
Assigning Membership Levels
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.
The membership level ID can be found on the Memberships > Membership Levels page in the WordPress Dashboard.
Most of this information can also easily be obtained from existing memberships by using the Export to CSV feature in Memberships > Members List in the WordPress Dashboard.
Note: The membership level ID needs to be a numerical value, for example – “3”.
Maintaining Active Subscriptions
If you want to continue or update an existing subscription, you must fill out the membership_subscription_transaction_id and membership_gateway fields.
If you are migrating a PMPro site to another PMPro site, you can find the Gateway and Subscription Transaction ID for your member(s) on the Memberships > Orders page under the Gateway and Transaction IDs columns respectively.
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-
and for Stripe this begins with sub_
.
WooCommerce Subscriptions, though as an example, does not use Stripe Subscriptions and rather triggers all payments as individual charges. There may not be a way to easily convert these one time payments to subscriptions through the import.
If you want to update an existing subscription, you must enter the updated billing details as well.

Please note that if you are migrating from s2member you must redirect the IPN using the instructions in this guide.
Import File Data Column (Column Headings)
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.
- 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.
- 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”.
- membership_id*: Membership Level ID of the user’s membership level. This can be found by going to Memberships > Membership Levels int he WordPress Dashboard.
- membership_code_id: Discount Code ID (if one was used). This can be found by going to Memberships > Discount Codes in the WordPress Dashboard.
- membership_initial_payment: The initial payment for the user’s membership level. This is usually set by the Initial Payment section on the Edit Membership Level page.
- membership_billing_amount: The recurring billing amount for the user’s membership level. This is usually set by the Billing Payment section on the Edit Membership Level page.
- membership_cycle_number: The number of billing cycles for the user’s membership level. This is usually set by the Billing Payment section on the Edit Membership Level page.
- membership_cycle_period: The billing cycle period. Possible values are “Day”, “Week”, “Month”, and “Year” (without the quotes). This is usually set by the Billing Payment section on the Edit Membership Level page.
- 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 member’s end date. (formatted as YYYY-MM-DD) *If the membership level is set up on an automatically recurring subscription no end date should be added.
- 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_subscription_transaction_id**: The Subscription Transaction ID. This is required to continue or update an existing subscription and can be found on the Memberships > Orders page in the WordPress Dashboard.
- 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 Payment Transaction ID. This can be found on the Memberships > Orders page in the WordPress Dashboard. This is the transaction ID created by the payment gateway. 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.
If you are using the Stripe gateway, this field is required for importing new users with an existing Stripe subscription. If this is not done, Stripe will not be able to get the Customer object successfully as that is queried using the payment transaction ID. - membership_affiliate_id: The Affiliate ID associated with the user’s order. This is only used if an affiliate tracking system is installed.
- pmpro_stripe_customerid: If you are using the Stripe gateway, include this column in your import. This field is the same as membership_subscription_transaction_id above.
*required to assign membership levels
**required to update recurring subscription
Field Name Prefixing for WordPress Protected Names
When importing user data, it’s important to ensure that the column names used in the CSV do not conflict with WordPress’s reserved query variables. These variables are integral to WordPress’s functionality, and cannot be duplicated in user fields.
To safeguard against potential issues, our Import Users From CSV Add On automatically checks the field names against a list of WordPress’s public query variables. If a field name from your CSV matches one of these reserved names, the plugin will automatically prefix that field name with pmprorhprefix_
before importing.
For instance, if you try to import a field named author
, it will be changed to pmprorhprefix_author
in the user’s meta.
Protected field names include calendar
, author
, name
, title
, and many more. Refer to the core Paid Memberships Pro code here for a complete list.
To avoid this prefixing during import, you may choose to manually prefix your field names or ensure that they don’t match any of the names in the protected list.
Billing Information Import
Since Paid Memberships Pro stores users’ billing information in user meta, you can also populate billing information by adding these columns:
Column Heading | Field Description |
---|---|
pmpro_bfirstname | First Name |
pmpro_blastname | Last Name |
pmpro_baddress1 | Address Line 1 |
pmpro_baddress2 | Address Line 2 |
pmpro_bcity | City |
pmpro_bstate | State |
pmpro_bzipcode | Postal Code |
pmpro_bcountry | Country – this should be one of the country codes found in includes/countries.php |
pmpro_bphone | Phone |
pmpro_bemail | Email Address |
pmpro_CardType | Card Type – possible values are “Visa”, “Mastercard”, “American Express”, and “Discover” (without the quotes). |
pmpro_AccountNumber | Card Number – 16 digit card number in the format XXXX-XXXX-XXXX-1234 |
pmpro_ExpirationMonth | Expiration Month – 2 digit expiration month of card(January = 01, February = 02, etc.) |
pmpro_ExpirationYear | Expiration Year – 4 digit expiration year of card |
Import 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 that are used in other ways 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.
Action and Filter Hooks
apply_filters( 'pmproiufcsv_cancel_prev_sub_on_import', false );
By default, the filter is set to ‘false’, meaning that existing subscriptions will not be canceled at the gateway during import. To change the default behavior, add a custom function to this filter hook and return ‘true’. Doing so will override the default behavior and allow for subscriptions to be canceled at the gateway level during the import process.
This is a Plus Add On.
Plus Add Ons are included in all Plus or higher premium membership plans.