How to Bulk Enroll Students in LifterLMS from a CSV File

LifterLMS has no CSV enrollment importer, but you can still bulk enroll a spreadsheet of students safely. Here are the built-in bulk tools, two CSV workflows, a tested WP-CLI script, and how to undo an import.

  • Add as a preferred source on Google
Illustration for “How to Bulk Enroll Students in LifterLMS from a CSV File”

A client sends a spreadsheet with 400 names and asks for everyone to be in the course by Monday. LifterLMS can bulk enroll students, but it has no "upload a CSV of enrollments" screen. You need two steps: get the people into WordPress as users, then enroll those users in the right course or membership.

This guide is for site owners and the developers who support them. It covers the bulk tools built into the free plugin, a no-code CSV route using a user import plugin, and a reusable WP-CLI script that creates accounts and enrolls them in one pass. It ends with how to check the result and roll it back if something goes wrong.

For enrolling one or two people, or for understanding the Cancel and Delete buttons, start with our guide to manually enrolling students.

The built-in LifterLMS bulk enroll tools

LifterLMS's own student bulk enrollment documentation describes the Users screen method. Together with the other core tools, you have four options before you need a CSV at all:

ToolWhereBest for
Users screen bulk enrollUsers > All UsersEnrolling existing users you can select in a list
Enroll New StudentsStudent Management box on a course or membershipA handful of named people
Enroll All MembersA membership's auto-enrollment listAdding a new course to everyone already in a membership, in the background
VouchersOrders > VouchersPeople who do not have accounts yet and will register themselves

Vouchers deserve a mention because they avoid the import altogether. You generate codes, send one per person, and each student registers and redeems it on the dashboard. That shifts account creation to the learner and keeps their chosen password private. Our coupons and vouchers guide covers the setup. The paid LifterLMS Groups add-on is another route for company seats; it lets a group leader paste a list of email addresses to send invitations in one go.

When you have a spreadsheet and the people need accounts created for them, use one of the CSV workflows below.

Prepare the CSV before you import anything

Most failed imports are spreadsheet problems. Clean the file first.

  1. Use one row per person with at least email, first_name and last_name. Add a course_id column if different people go into different courses or memberships.
  2. Remove duplicates and fix emails. Trim spaces, lower-case the addresses, and remove obvious typos. The email is how you will match existing accounts.
  3. Look up the IDs. Hover over a course or membership in the dashboard list to see its post ID. Enrollment by ID is unambiguous; enrollment by title is not.
  4. Save as UTF-8 CSV. Accented names break in other encodings.
  5. Decide on emails. Will new users get a WordPress account email? Will your enrollment engagements send 400 welcome emails at once? Decide now, not halfway through.

Workflow 1: import users, then bulk enroll from the Users screen

This is the no-code route and works well up to a few hundred people.

Step 1: create the accounts

Use a user import plugin such as Import and export users and customers from WordPress.org, which creates users from a CSV, updates existing ones instead of duplicating them, and can send account emails. If you have SSH access, WordPress's own wp user import-csv command does the same with a CSV of user_login, user_email, display_name and role. Its --skip-update option leaves existing users alone, and --send-email sends new users their details.

Set the role to student, the role LifterLMS creates for learners, so the new accounts do not get dashboard access they do not need.

Step 2: enroll them from Users > All Users

  1. Go to Users > All Users. Filter by the Student role, or search for a shared email domain, so the imported people are together.
  2. Open Screen Options and raise the number of users per page so you can select everyone you need. Keep it moderate; each selected user is enrolled in the same request.
  3. Tick the users.
  4. In the course and membership selector above the table, choose the course or membership.
  5. Click Enroll. LifterLMS shows a notice for each user, such as "Successfully enrolled Jane Doe into Course Name".

The selector only appears for users with the manage_lifterlms capability, so administrators and LMS Managers can use it but instructors cannot. Each enrollment is recorded with your admin account as the trigger.

Workflow 2: one WP-CLI script that creates accounts and enrolls them

For larger lists, mixed courses, or an import you will repeat every term, a script is faster and leaves a clear record. The one below reads a CSV with email, first_name, last_name and course_id columns, creates missing users with the Student role, and enrolls each person using LifterLMS's own llms_enroll_student() function. It defaults to a dry run.

<?php
/**
 * Bulk enroll from CSV.
 * Dry run:  wp eval-file llmsx-csv-enroll.php students.csv
 * Real run: wp eval-file llmsx-csv-enroll.php students.csv go
 */
$file    = isset( $args[0] ) ? $args[0] : '';
$dry_run = ! ( isset( $args[1] ) && 'go' === $args[1] );
$trigger = 'llmsx_csv_' . gmdate( 'Ymd' );

if ( ! $file || ! is_readable( $file ) ) {
	WP_CLI::error( 'Pass a readable CSV file.' );
}

$handle = fopen( $file, 'r' );
$header = array_map( 'trim', fgetcsv( $handle ) );

while ( ( $row = fgetcsv( $handle ) ) !== false ) {
	if ( count( $row ) !== count( $header ) ) {
		continue;
	}
	$data   = array_combine( $header, array_map( 'trim', $row ) );
	$email  = sanitize_email( $data['email'] );
	$course = absint( $data['course_id'] );

	if ( ! is_email( $email ) || ! in_array( get_post_type( $course ), array( 'course', 'llms_membership' ), true ) ) {
		WP_CLI::warning( "Skipped row: {$data['email']} / {$data['course_id']}" );
		continue;
	}

	$user = get_user_by( 'email', $email );
	if ( $dry_run ) {
		WP_CLI::log( ( $user ? 'Existing' : 'New' ) . " user {$email} -> {$course}" );
		continue;
	}

	if ( ! $user ) {
		$user_id = wp_insert_user(
			array(
				'user_login' => $email,
				'user_email' => $email,
				'user_pass'  => wp_generate_password( 24 ),
				'first_name' => sanitize_text_field( $data['first_name'] ),
				'last_name'  => sanitize_text_field( $data['last_name'] ),
				'role'       => 'student',
			)
		);
		if ( is_wp_error( $user_id ) ) {
			WP_CLI::warning( "{$email}: " . $user_id->get_error_message() );
			continue;
		}
	} else {
		$user_id = $user->ID;
	}

	$done = llms_enroll_student( $user_id, $course, $trigger );
	WP_CLI::log( ( $done ? 'Enrolled ' : 'Already enrolled or failed ' ) . "{$email} in {$course}" );
}

fclose( $handle );
WP_CLI::success( $dry_run ? 'Dry run finished.' : "Done. Trigger used: {$trigger}" );

Three details make this script safe to rerun. llms_enroll_student() returns false for people who are already enrolled instead of duplicating them. Existing accounts are matched by email and left as they are. And every enrollment gets a dated custom trigger such as llmsx_csv_20261030, which shows up in the Enrollment Trigger column of the course's Student Management table so you can see exactly who came from which import.

New users created this way do not know their password. Either send them to the lost password link on your student dashboard, or call wp_new_user_notification( $user_id, null, 'user' ) after creating each account so WordPress emails a set-password link. For more on the command line, see our LifterLMS WP-CLI guide.

Check the import and roll it back if needed

Before you tell the client it is done, check three things:

  • The Student Management table on the course shows the expected number of Enrolled students.
  • One imported test person can log in, sees the course on their dashboard, and can open the first lesson.
  • Your email log shows the messages you expected and nothing more.

If the wrong people went into the wrong course, the custom trigger lets you undo only that import. llms_unenroll_student() removes a student only when the trigger matches, so paid and earlier enrollments are untouched:

wp eval '
$course  = 123;
$trigger = "llmsx_csv_20261030";
foreach ( llms_get_enrolled_students( $course, "enrolled", 500 ) as $uid ) {
	if ( llms_unenroll_student( $uid, $course, "cancelled", $trigger ) ) {
		echo "Cancelled {$uid}\n";
	}
}'

Test the rollback on staging first, and take a database backup before any bulk change on production.

Common mistakes

  • Hundreds of welcome emails at once. Enrollment engagements fire for every person. Pause them, or warn the client and your email provider, before a large run.
  • Importing with the wrong role. Subscriber works, but Student is clearer; anything above that gives people dashboard access.
  • Selecting too many users on one screen. The Users screen enrolls everyone in one request, which can time out on slow hosts. Work in pages of a hundred or so, or use the script.
  • Matching by name. Two "John Smith" rows become one account. Always match on email.
  • Running on production first. Do a dry run and a three-row test on a staging copy.

Frequently asked questions

Does LifterLMS have a CSV import for students?

Not in core. You import users with WordPress tools or a plugin, then enroll them with the Users screen, vouchers or a script like the one above.

Can I bulk enroll into a membership instead of a course?

Yes. Every method here accepts a membership. Members are then auto-enrolled in the membership's courses.

Can I keep enrollments in sync with a Google Sheet?

For ongoing syncing rather than a one-off import, an automation tool is a better fit. Zapier has a ready-made LifterLMS template for enrolling people when rows are added to Google Sheets; our Zapier automations guide covers the setup and its limits.

Will bulk enrolled students see the course immediately?

Yes, unless drip settings, a course start date or prerequisites hold back the content.

Next steps

For a one-off list, import the users and enroll them from the Users screen. For anything recurring, such as a new cohort every term or a feed from an HR system, put the logic in a script or an integration so it is repeatable and auditable instead of a Friday afternoon of ticking boxes.

We build that kind of import and sync for training providers, including validation, logging and rollback. See our LifterLMS development service, or send us a sample of your spreadsheet and we will tell you the fastest safe way to load it.

Add LifterLMS Expert to your preferred sources

Add lifterlmsexpert.com as a preferred source on Google, or open this article in your AI assistant to use it as a source.

  • Add as a preferred source on Google
Free consultation

Prefer expert help over DIY?

Skip the trial and error. Get specialist LifterLMS help and ship faster.

Talk to a LifterLMS Expert Explore our services

Replies within one business day