How Tutor LMS Stores Course Progress (and How to Query It)
Where Tutor LMS keeps enrollments, lesson completion, quiz attempts, assignment submissions and course completion, with read-only SQL for reports and the PHP functions to prefer.
Checked against the plugin source: Tutor LMS 4.1.3, Tutor LMS Pro 4.1.3

Tutor LMS spreads a student's progress across WordPress's own tables and a few custom ones. Knowing where each piece lives makes reports, migrations and debugging much easier. This map is verified against Tutor LMS 4.1.3. Queries use the default wp_ prefix and are read-only; inside WordPress, prefer the PHP functions noted, which apply filters and caching.
The five places
| What | Where | PHP |
|---|---|---|
| Enrollment | wp_posts, post type tutor_enrolled | tutor_utils()->is_enrolled() |
| Lesson completion | wp_usermeta, key _tutor_completed_lesson_id_{lesson_id} | is_completed_lesson() |
| Quiz attempts | wp_tutor_quiz_attempts and wp_tutor_quiz_attempt_answers | Quiz attempt functions |
| Assignment submissions (Pro) | wp_comments, comment type tutor_assignment | Assignment add-on functions |
| Course completion | wp_comments, comment type course_completed | is_completed_course() |
Enrollments
Each enrollment is a post: post_author is the student, post_parent is the course and post_status is the status (completed means active; also pending and cancel).
SELECT post_author AS user_id, post_date AS enrolled_at
FROM wp_posts
WHERE post_type = 'tutor_enrolled'
AND post_parent = 123
AND post_status = 'completed';
Lessons
When a student completes a lesson, Tutor LMS saves user meta named _tutor_completed_lesson_id_ followed by the lesson ID. The value is the completion time.
SELECT user_id, REPLACE(meta_key, '_tutor_completed_lesson_id_', '') AS lesson_id, meta_value
FROM wp_usermeta
WHERE meta_key LIKE '\_tutor\_completed\_lesson\_id\_%';
Quiz attempts
wp_tutor_quiz_attempts has one row per attempt with course_id, quiz_id, user_id, total_marks, earned_marks, attempt_status and start and end times. Statuses include attempt_started, attempt_ended, review_required and attempt_timeout. Individual answers are in wp_tutor_quiz_attempt_answers.
SELECT user_id, quiz_id, earned_marks, total_marks, attempt_status, attempt_ended_at
FROM wp_tutor_quiz_attempts
WHERE course_id = 123
ORDER BY attempt_ended_at DESC;
For progress, any attempt that is not attempt_started counts the quiz as done.
Course completion
Completion is a comment on the course with comment_type = 'course_completed' and comment_agent = 'TutorLMSPlugin'. The comment content is a hash, used as the certificate ID in Tutor LMS Pro.
SELECT user_id, comment_date AS completed_at, comment_content AS certificate_hash
FROM wp_comments
WHERE comment_type = 'course_completed'
AND comment_post_ID = 123;
How the progress percentage is built
Progress is completed items divided by all lessons, quizzes and assignments in the course: completed lessons from user meta, finished quizzes from attempts, and submitted assignments. See getting progress with PHP.
Cautions
- Never write to these tables directly on a live site. Use Tutor LMS functions so hooks, caches and related data stay consistent.
- The
LIKEquery onwp_usermetais slow on large sites. Run it on a replica or export, not on production at peak time. - Bundles, retakes and resets change the picture; check them in your data.
Full table list: Tutor LMS database tables. Large site slowing down? Our database optimization service can help.
Save this practical guide
Add us as a preferred Google source, or ask an AI assistant to summarize this page and link back to the original guide when it is useful.
