Development

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

How Tutor LMS Stores Course Progress (and How to Query It)

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

WhatWherePHP
Enrollmentwp_posts, post type tutor_enrolledtutor_utils()->is_enrolled()
Lesson completionwp_usermeta, key _tutor_completed_lesson_id_{lesson_id}is_completed_lesson()
Quiz attemptswp_tutor_quiz_attempts and wp_tutor_quiz_attempt_answersQuiz attempt functions
Assignment submissions (Pro)wp_comments, comment type tutor_assignmentAssignment add-on functions
Course completionwp_comments, comment type course_completedis_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 LIKE query on wp_usermeta is 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.

Vishavjeet
· Enterprise LMS Architect | WordPress & LMS Expert | WooCommerce | AI Automation

I’m Vishavjeet Choubey, an Enterprise LMS Architect with 10+ years of experience helping businesses, coaches, universities, and online academies build and scale powerful digital learning platforms. I specialize in enterprise LMS architecture, WordPress, WooCommerce, LifterLMS, LearnDash, Moodle, custom plugin development, and AI-driven automation. I build scalable LMS platforms, high-converting eCommerce solutions, and custom WordPress applications designed to improve user experiences, streamline operations, and drive measurable business growth. My approach combines deep WordPress and LMS engineering expertise with modern AI automation to reduce manual work, improve efficiency, and help organizations launch, scale, and grow faster.

Keep reading

Need a custom Tutor LMS solution?

Tell us what you are building or what is broken. A Tutor LMS developer reads every inquiry and replies with next steps and a free estimate.

Get a free Tutor LMS consultation

Tell us what you are building or fixing. A Tutor LMS developer replies with honest advice and next steps.

  • No obligation
  • Tutor LMS and Pro specialists
  • Your details stay private

This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.