Browse: Home / Snippets /

Import users via CSV

Contents


Snippet #

If you have a lot of users that you want to upload to your site, you can also automatically place them into the desired groups. First, you need to use the following free plugin: https://wordpress.org/plugins/import-users-from-csv-with-meta/

Once installed and activated, You will need to add these meta values to the example template (the plugin above includes an example template):

    meta_key:
    learndash_group_users_455
    meta_value: 455

Assuming that group ID is 455 of course, update to what your ID is. You can find this by clicking on the group title (as if you were going to edit it). In the URL you will see the ID number. Alternatively, you can install this free plugin: https://wordpress.org/plugins/reveal-ids-for-wp-admin-25/

For adding group admins, this process is similar:

    meta_key:
    learndash_group_administrators_455
    meta_value: 455


Assuming that group ID is 455.

To Recap
The CSV upload plugin requires…

    Header Row 1 = username
    Header Row 2 = password
    Header Row 3 = email

(From row 4 on, you can put data in whatever order you want).

Header Row 4 = learndash_group_users_455 (replace “455” with your group #)

—Then in the Row 4 column add “455” (replace “455” with your group #)

After submitting, your users will be created and they are properly assigned to the group, and therefore automatically enrolled in the courses associated to that group.