CSV Member Import

I am building out a new membership site for a client and I’ve got 12,000 members to import and configure. That is way, way too many to do manually.

In this thread, David suggests writing a script to add them.

I’ve got a good programmer and a mySQL person to help – can you suggest how we might script this? We can hack up a csv uploader, but since membership is a bit trickier, I thought I’d ask before we spin our wheels on it.

Many thanks!


  • DavidM
    • DEV MAN’s Mascot

    Hi Sue,

    The Batch Create plugin can definitely help you get users added in, that’s the plugin I should have mentioned in that prior thread. Thanks for mentioning it spatical! :slight_smile:

    As for scripting, I’ll quote Barry from the following thread, as he gives a good breakdown on that specifically:


    Have a look in the membershipincludes/classes directory. This directory holds all the main classes for the plugin. The class.membership.php file (need to confirm the file name) holds all the methods for a member. You would create a member instance like:

    $member = new M_Member( $user_id );

    The methods in that class allow you to assign a level or subscription to that member and also remove one or move from one to another.

    Their are similar classes for subscriptions class.subscription.php, and levels class.level.php that will allow you to create subscriptions and/or levels programmatically and change the levels / rules with in them.

    If you’ll create a separate thread for any specific questions you might have on all of that we can see how we can assist you on it.



Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.