LifterLMS WP-CLI: Managing Courses and Students with wp llms
What the LifterLMS WP-CLI commands bundled with LifterLMS 10.x can do: list and create courses, read course structure and enrollments, manage add-ons…
Read articleAI agents can now work with a LifterLMS site directly: answer "which students have not started the new course?", draft a course outline, or enroll a list of new hires. Since version 10.1, LifterLMS registers its core operations with the WordPress Abilities API, which gives AI tools a standard, permission-checked way to discover and use them.
This guide is for developers and technical owners who want LifterLMS AI automation without handing a chatbot the keys to their student data. It explains what the Abilities API is, exactly which LifterLMS abilities exist, how agents reach them, and the controls we put in place before letting any agent touch a live site.
Details were checked against the LifterLMS 10.3 source and the WordPress developer documentation at the time of writing. This area is moving quickly, so check the current docs before you build.
The Abilities API arrived in WordPress 6.9. Plugins register named abilities, each with a label, a description, a JSON schema for its input and output, and a permission check. Any client can then list what a site can do and run an ability by name, without knowing the plugin's internals.
Abilities registered for REST are exposed under /wp-json/wp-abilities/v1. According to the Abilities REST API documentation, every endpoint requires an authenticated user, application passwords are the recommended method for external clients, and each ability's own permission check runs on top of that.
Read-only abilities are run with GET, destructive ones with DELETE, and others with POST. The WordPress team's MCP Adapter then translates abilities into the Model Context Protocol, the standard most AI assistants use to call tools.
On WordPress 6.9 or later, LifterLMS registers a lifterlms ability category automatically. There is no setting to switch on. Each ability wraps a LifterLMS REST API endpoint.
For courses, sections, lessons, memberships, access plans, students, quizzes, questions and certificate templates, there are five abilities each, following one pattern. For courses they are:
lifterlms/list-courses and lifterlms/get-courselifterlms/create-course and lifterlms/update-courselifterlms/delete-courseOn top of those come task-specific abilities:
| Area | Abilities |
|---|---|
| Course structure | get-course-content, get-course-enrollments |
| Enrollment | list-enrollments, enroll-student, update-enrollment, unenroll-student |
| Progress and grades | get-progress, update-progress, delete-progress, get-student-grades |
| Quizzes | get-quiz-questions, list-quiz-attempts, get-quiz-attempt, grade-quiz-attempt, delete-quiz-attempt |
| Orders | list-orders, get-order, get-order-transactions |
| Certificates | list-awarded-certificates, get-awarded-certificate, award-certificate, revoke-awarded-certificate |
All of them carry the lifterlms/ prefix. Orders are read-only through abilities: there is no create, update or refund ability.
grade-quiz-attempt can leave remarks without points, which keeps the attempt pending for an instructor to sign off.| Route | Best for | Authentication |
|---|---|---|
| Abilities over REST or MCP | AI assistants and tools without server access | WordPress application password |
WP-CLI (wp llms) | Coding agents with a shell on the server or staging | Server access; pass --user |
| LifterLMS REST API | Your own integrations and scripts | LifterLMS API keys or application passwords |
LifterLMS's own AI agents guide recommends the CLI for agents with shell access, with --format=json and --fields to keep output small. Our LifterLMS WP-CLI guide covers those commands.
# List the registered abilities
curl -u "agent-user:xxxx xxxx xxxx xxxx xxxx xxxx" \
"https://example.com/wp-json/wp-abilities/v1/abilities"
# Run a read-only ability
curl -u "agent-user:xxxx xxxx xxxx xxxx xxxx xxxx" \
"https://example.com/wp-json/wp-abilities/v1/lifterlms/list-courses/run"
# Enroll student 5 in course 42 (POST, input as JSON)
curl -X POST -u "agent-user:xxxx xxxx xxxx xxxx xxxx xxxx" \
-H "Content-Type: application/json" \
-d '{"input":{"id":5,"post_id":42}}' \
"https://example.com/wp-json/wp-abilities/v1/lifterlms/enroll-student/run"
The MCP Adapter plugin publishes abilities to MCP clients over HTTP, or over STDIO through WP-CLI for local work. Its default server only exposes abilities marked public. LifterLMS registers its abilities for REST but, at the time of writing, does not mark them public for MCP, so you choose which ones to expose by listing them in your own MCP server configuration. That is a feature, not a gap: you should be choosing.
The abilities are building blocks. These are the jobs where we see them earn their keep, roughly in order of risk:
get-course-enrollments and get-progress. Read-only, and it saves an admin a spreadsheet session.get-course-content returns a course's sections and lessons in one call. An agent can check every course for empty sections, draft lessons or missing quizzes and produce a list for a human to fix.create-course and create-lesson can produce draft outlines from a brief. Keep new content in draft status and have an instructional designer review it before anything is published.grade-quiz-attempt without points, leaving the attempt pending for the instructor to confirm.enroll-student is the first write most teams allow. Every enrollment triggers the usual emails and engagements, so test on staging.Agents are poor at anything where a wrong answer is expensive and invisible, such as changing access plan prices or bulk-resetting progress. Keep those abilities off.
Create a WordPress user just for the agent and give it the least powerful role that covers the task. LifterLMS adds LMS Manager, Instructor and Instructor's Assistant roles; a reporting agent rarely needs more than an instructor-level role scoped to its courses. Never connect an agent as a real administrator. Our guide to LifterLMS roles and capabilities explains what each role can reach.
Create the password under the agent user's profile, name it after the tool, and store it in that tool's secret store, not in a prompt, document or repository. Revoke it the moment the tool is retired.
LifterLMS passes its ability list through a filter before registering anything. This keeps only read-only abilities on the whole site, a sensible starting point:
<?php
/**
* Plugin Name: LLMSX Read-only Abilities
*/
add_filter( 'llms_rest_ability_configs', 'llmsx_readonly_abilities' );
function llmsx_readonly_abilities( $configs ) {
return array_values(
array_filter(
$configs,
function ( $config ) {
return in_array( $config['operation'], array( 'list', 'get' ), true );
}
)
);
}
When you are ready for writes, allow specific ones by name, for example keeping enroll-student while every delete stays off. The name key in each configuration holds the ability name without the lifterlms/ prefix.
Point new agents at a staging copy. Review what they ran before giving them production access, and require human confirmation for destructive abilities. A cloned site carries webhooks and payment settings, so read our notes on staging and recurring payments before cloning.
LifterLMS 10.1 registered courses, sections, lessons, memberships, access plans, students, enrollments and progress. Version 10.2 added quizzes, attempts, orders, certificates and student grades.
No. On WordPress 6.9 or later the abilities register automatically. On older WordPress versions they are simply absent.
Not through the LifterLMS abilities. Orders and transactions are read-only there.
No. The ability registration is part of the free core plugin. The AI tool you connect has its own costs.
Start read-only. On staging, add the read-only filter above, create a dedicated user and application password, and connect your AI tool. Ask it reporting questions you can check by hand. Only when its answers are reliable, allow one write ability at a time.
If you want an AI workflow on your LifterLMS site, such as reporting, onboarding enrollments or grading support, built with proper permissions, logging and review, our LifterLMS integrations service designs it and our consulting service can review a plan you already have. Tell us what you want the agent to do.
What the LifterLMS WP-CLI commands bundled with LifterLMS 10.x can do: list and create courses, read course structure and enrollments, manage add-ons…
Read article
A practical reference to the LifterLMS hooks developers use most: enrollment, completion, quiz, order and registration actions, plus the filters that…
Read article
How LifterLMS finds template files, how to override one in a child theme, when a hook is the better choice, and a repeatable way to spot and update…
Read articleSkip the trial and error. Get specialist LifterLMS help and ship faster.