Bulk Enroll from a List
Learnomy overviewFree + ProGet Learnomy →
Bulk enroll lets you add many students to a course at once by pasting a list of email addresses or uploading a CSV file. It runs from the course detail screen in wp-admin, creates accounts for people who do not have one yet, and gives manual access to people who already have the course another way, so it stays if that other access ends.
What you can do
Section titled “What you can do”- Enroll a whole list of students in one course in a single action instead of adding them one by one.
- Paste email addresses straight into a box, one per line or separated by commas.
- Upload a CSV (or plain text) file of email addresses instead of pasting.
- Automatically create an account for any email that does not have one yet, and send that person a set-password invite so they can log in.
- Give manual access to anyone who already has the course another way (a purchase, a plan), so refunding the purchase later does not take away the access you gave. Someone who already has manual access is skipped, so re-running the same list never double-enrolls or double-charges.
- See a per-run summary that tells you how many were enrolled, how many new accounts were invited, how many already had the course another way and now also have manual access, how many already had manual access, and how many failed.
- Grant access to a course set to Access granted externally (closed) without a payment step, since these courses are not sold on your site.

How to use it
Section titled “How to use it”Step 1 – open the course detail screen
Section titled “Step 1 – open the course detail screen”Go to Learnomy -> Courses, then open the course you want to enroll people into. This opens the course detail screen (?page=learnomy-course-detail&course_id=<course id>).
Step 2 – find the Enroll a student card
Section titled “Step 2 – find the Enroll a student card”Scroll to the Enroll a student card. Below the single-student email box there is a collapsible row labelled Bulk enrol from a list (CSV / emails). Click it to expand.
Step 3 – provide the list of emails
Section titled “Step 3 – provide the list of emails”You have two ways to supply the list, and you can use either one:
- Paste the addresses into the text box, one email per line or comma-separated. Whitespace, commas, and semicolons between addresses all work as separators.
- Upload a file by clicking Choose CSV and picking a
.csvor plain text file. Its contents are read into the same text box, so you can review or edit the list before submitting.
Quotes around a CSV cell, Name <address>, brackets and trailing dots or commas are fine, names and header cells are ignored, and duplicate addresses are collapsed to one (matching is case-insensitive), so a messy list is fine.
An entry that has an @ but is not an email address as typed (for example joe@@example.com) is skipped, never guessed at. The result says how many were skipped and names the first few, so you can correct and add them.
Step 4 – enrol everyone
Section titled “Step 4 – enrol everyone”Click Enrol everyone. Learnomy processes the list and, for each address:
- If the person already has manual access to the course, they are skipped.
- If the person already has the course another way (a purchase, a membership plan), they also get manual access, and the summary says so.
- If the person already has an account but is not enrolled, they are enrolled (source: manual).
- If the email has no account yet, Learnomy creates one and sends a set-password invite, then enrolls the new account.
Step 5 – read the result summary
Section titled “Step 5 – read the result summary”When the run finishes, a summary line appears under the button, for example: how many were enrolled, how many new accounts were invited, how many already had the course another way and now also have manual access, how many already had manual access, and how many failed.
If your list was longer than the per-request cap (500 by default), or your host would not allow enough time for all of it in one go (creating many new accounts takes a while), the summary tells you how many are left to do and asks you to submit again to continue. The text box then holds exactly the addresses still to do, so keep clicking Enrol everyone until nothing is left. Nobody is enrolled or invited twice.
Settings & options
Section titled “Settings & options”The bulk enroll controls live inside the Enroll a student card on the course detail screen. The fields are:
| Control | What it does |
|---|---|
| Bulk enrol from a list (CSV / emails) | The collapsible section that holds the whole feature. |
| Choose CSV | File picker. Accepts .csv, text/csv, and text/plain. The file is read into the text box. |
| Email text box | Paste target. One email per line or comma / semicolon / whitespace separated. |
| Enrol everyone | Submits the list to the bulk enroll endpoint. |
Behavior worth knowing:
- Source is manual. Every seat created this way is recorded with
source = manual, which bypasses payment. Use it for teams, cohorts, comped access, or closed courses. - Students who already have manual access are skipped, so re-submitting the same list is safe.
- New emails are provisioned with an account plus a set-password invite, the same way the incoming enrollment webhook provisions first-time buyers.
- Per-request cap. At most 500 addresses are processed per submission. Anything beyond that stays in the text box and is reported as “left to do”, so submitting again does the rest. The cap is adjustable with the
learnomy_bulk_enroll_maxfilter. - Time limit per request. A submission stops by itself after two thirds of your host’s PHP time limit, 20 seconds at most, and leaves the rest in the text box the same way. On a stock 30 second host that is usually around 75 to 150 new accounts per submission; people who already have an account are much quicker.
For developers
Section titled “For developers”REST route (under the learnomy/v1 namespace, admin only):
POST /admin/courses/{id}/bulk-enroll– enrolls a list of emails into course{id}. Permission callback isis_admin. Body paramemailsis a required array of strings (each string may itself contain several addresses; the handler splits on whitespace, commas, and semicolons, checks each address as typed, and dedupes). Optional booleanstop_before_time_limit(defaultfalse): sendtrueonly if you readremaining_emailsand send those again; the request then stops before the host’s PHP time limit and returns the rest there. Without it the whole list is processed, up to the cap, however long it takes. Returns asummaryobject (enrolled,created,also_manual,skipped,failed,refused), amessagewith the summary in words, a per-emailrowsarray, arefusedarray (what was typed, for the entries with an@that are not addresses; they are not inrows), aremainingcount for anything past the cap, andremaining_emails, the addresses themselves: send those in the next request.
Filter:
learnomy_bulk_enroll_max– the maximum number of addresses processed per request. Defaults to500. Addresses past it come back inremaining_emails.learnomy_bulk_enroll_seconds– the seconds a request sent withstop_before_time_limitworks before it stops and returns the rest. The course screen sends it; other callers are not stopped by time. Defaults to two thirds of PHP’smax_execution_time, 20 at most (20 when there is no limit). At least one address is always processed, so even0moves on.
Under the hood the handler resolves or creates each account through Provisioning_Service::ensure_user_by_email() (the same path a guest checkout and the incoming sales webhook use) and enrolls through Enrollment_Service::enroll( $user_id, $course_id, 'manual' ). Already-active seats are detected with Enrollment::find_active().

