Search for answers:
Customer Notices: WordPress 4.5 Affects LiveEditor Functionality - See this article WordFence Plugin Affects LiveEditor - See this article

How to import/export users with OptimizeMember

With OptimizeMember, you can Import and Export your Users/Members information to a CSV file.  You can use the Import/Export options for easy data backup purposes, or to make many changes to user/member information and then re-import those changes into OptimizeMember.

This guide will explain how to export and import user/member information.

The OptimizeMember Import/Export settings may be found under "OptimizeMember > Import/Export"

You'll notice there are 3 tabs there. We're only going to discuss the two related to User/Member Import/Export in this guide.

opm-import-export-1.png

 

Exporting Users

Click on the tab for "User/Member CSV Exportation" to expand the options. These options will allow you to download (export) a copy of all your membership site's user data (the same data you see when visiting "WordPress Dashboard > Users"

opm-import-export-2.png

The default settings work just fine for most site owners and usually all you need to do is click Export Now to have OpitmizeMember generate the CSV file and then prompt you to download it.

The default option, Default (CSV...), is required if you want to re-import the CSV file into your OptimizeMember site. If you only want to download the information to view it, or to print it out, you may prefer the Easy-Read option, which exports the data in a format that is more human-readable.

If you run into an issue where the export file looks corrupted, please read our guide on how to fix this: https://optimizepress.zendesk.com/hc/en-us/articles/115003534947

 

Importing Users

Click on the tab for "User/Member CSV Importation" to expand the options. This area allows us to upload an existing CSV file that contains user/member information.

opm-import-export-3.png

To import an existing CSV file, simply click the "Choose File" button, locate and select the CSV file on your computer, and then click the "Import Now" button to import the users.

You can also paste or type information into the box below the "Import Now" button instead of selecting a CSV file. The information in the box must follow the same format as the CSV file. 

ie...  "Id","Username","First Name","Last Name","Display Name","Email", "website","user level","custom capability"

There is a lot more to consider when importing users. The rest of this guide is a bit more advanced but can be helpful if you need to create your own import file or edit the export file.

 

Advanced User Importation Options

In this section we will look into a more advanced user importation method than the simple export/import options discussed above. Using the below details will help you if you have the need to import users from other membership platforms into OptimizeMember, as we will be discussing the formatting necessary to make that happen.

 

CSV Import Structure Tip

If you are not sure how to properly format your CSV file, we would recommend doing an export first, as the CSV file you download by exporting, would already be in the proper format and you could use that as sort of a boiler plate/template for building your own import files.

All import fields must be properly encapsulated using double quotes and separated by commas. You should also ensure that your import fields are in the proper order as well, otherwise the data may not be imported correctly.

You could also use the import file to do a mass update of your users as well.

CSV Import Formatting and Samples

The format is always going to be the same regardless if you are adding new users or updating existing ones. The only difference is the information you include or not include.

In the most basic recommended format, you would include the following fields:

"ID","Username","Password","First Name","Last Name","Display Name","Email","Website","User Role","Custom Capabilities"

For "User Role" that is actually the user level in OptimizeMember, and "custom capabilities", those are OptimizeMember packages.

It should also be noted that the difference between importing new users, and updating existing users is the presence of the ID field in each line.

If you want to update a user, please make sure the user ID is included. 

If you are creating new users with the import file, any new user should NOT have a user ID included, however you still need to have the space there, so just put the quote marks with no ID in it, and it will work fine. Leaving out the double quotes for the ID field would mean the importation would fail, because it would think you mean the user name is the user ID which is not correct and importing would fail and show an error regarding this.

Example of importing a new user:

"","johndoe22","8834ks9903","John","Doe","John Doe","johndoe22@example.com","","optimizemember_level1","music,videos"

Example of importing a user who is getting updated:

"123","johndoe22","8834ks9903","John","Doe","John Doe","johndoe22@example.com","","optimizemember_level7","music,videos,guitar"

In this example, the existing user johndoe22 is User ID 123 in WordPress. Also note there is no website in either example, and the membership level was increased and we added a "guitar" capability. OptimizeMember Packages should always be separated with commas and not have any spaces.

You may also include other data in the CSV for each user. Just do an export and see what fields you have available, and you can fill those in (or not).

Password value in the CSV import file

If you include a password it will be used, otherwise WordPress will automatically create a password (for new users).

For existing users, if you include the password then it will update that user's password. If you leave the password field blank for existing users, then the password will remain unchanged for that user.

 

Importation Will Always Be Performed Silently

Users will not be sent any emails from OptimizeMember when importing CSV files, unless you have another plugin that conflicts with OptimizeMember's ability to do the import properly. We would suggest testing one or two accounts before importing a large amount of users all at one time.

If you decide that you would rather have users notified by WordPress of their new account, you may wish to add the uses manually through the "WordPress Dashboard > Users > Add new" and select one of OptimizeMember's user roles.

 

Didn't find an answer to your question? Contact Our Support Team (Submit a ticket)
Was this article helpful?
0 out of 0 found this helpful
Follow

Comments

Other Help Categories:

Get Started Guide

Watch our Ultimate Getting Started guide video

Pre-Sales Questions

Ask questions before purchasing our products

Login Problems

If you're having issues logging into our members hub

Accounts & Billing

Update your billing, request a refund and other accounts help

API Key Issues

Get help with licensing your site and API key issues

Membership Help

Get help creating Membership portals and courses

LiveEditor Help

If you need help using or troubleshooting the LiveEditor

Integrations

Find out about the many integrations possible with OptimizePress

Affiliate Questions

Have questions about promoting OptimizePress

Clubhouse Questions

Questions about our Clubhouse Membership Subscription
Powered by Zendesk