LifterLMS Database Description

Table: wp_lifterlms_user_postmeta

# Top

This table stores information related to a specific user (generally a student) in the wp_users table and a specific post (generally a LifterLMS custom post type) in the wp_posts table.

Field Description
meta_id (int) Auto-incremented ID of the meta item.
user_id (int) WordPress User ID of the related user. Corresponds to the ID field in the wp_users table.
post_id (int) WordPress Post ID of the related post. Corresponds to the ID field in the wp_posts table. The related posts in this table will almost always be a LifterLMS custom post type.
meta_key (string) A string which describes the type of meta data stored in the table row.
meta_value (longtext) The actual contents of the meta data stored in the row.
updated_date (datetime) The last date the meta data row was updated. This will be the date of creation or the last update.

Table: wp_lifterlms_quiz_attempts

# Top

This table stores information for each quiz attempt.

Field Description
id (int) Auto-incremented ID of the quiz attempt.
student_id (int) WordPress User ID of the related user. Corresponds to the ID field in the wp_users table.
quiz_id (int) WordPress Post ID of the related quiz. Corresponds to the ID field in the wp_posts table.
lesson_id (int) WordPress Post ID of the related quiz. Corresponds to the ID field in the wp_posts table.
start_date (datetime)The date when the quiz attempt was started
update_date (datetime) The last date the attempt was updated.
end_date (datetime) The date when the quiz attempt was completed. This will be null if the quiz was abandoned.
status (string) The current status of the attempt. Statuses can be incomplete, pending (requires manual grading), pass, or fail.
attempt (int) The numeric attempt number for the quiz. If this is the student’s 3rd time taking the quiz, it will be attempt 3.
grade (float) The percentage grade of the quiz (0-100). Will be null if for incomplete quizzes.
questions (string) A serialized array of question and answer data for the quiz attempt. See arstarst below for array description.

Quiz Attempt Questions Array

# Top

Question data for each student quiz attempt is stored in the wp_lifterlms_quiz_attempts table in the questions column as a serialized array. This array will be made up of one or more associative arrays of individual question data, each array representing a single question.

Key Description
id (int) WP Post ID of the LifterLMS Question post.
earned (int) Number of points earned for the question.
points (int) Number of points available for the question.
answer (array) For questions with choices, will be an array of the choice IDs selected by the user. For advanced questions which require manual grading, will be an array (containing only a single value) containing the user’s submitted answer. For example, in a short answer question would contain the text of the student’s submitted short answer.
correct (string) Record of whether or not the question was answered incorrectly. “yes” when the question was answered correctly, “no” when answered incorrectly. When the question requires manual grading and has not yet been graded the value will be null.
remarks (string) Will hold the instructor’s remarks on the question. Only applicable when the quiz has been reviewed or graded and remarks have been recorded.

Data: wp_lifterlms_user_postmeta

# Top

The following are descriptions of the various pieces of data stored in this table. As the table is used to store data related to various scenarios, we are defining the data based on the value of the meta_key field.

meta_key meta_value post_id Description
_achievement_earned (int) post ID of a llms_my_achievement post llms_achievement post This meta item is added when a student earns a LifterLMS certificate. The meta value is the awarded achievement. The post_id is the template for the achievement.
_certificate_earned (int) post ID of a llms_my_certificate post llms_certificate post This meta item is added when a student earns a LifterLMS certificate. The meta value is the awarded certificate. The post_id is the template for the certificate.
_is_complete (string) “yes” course, lesson, or section post Denotes the completion of the related post identified by the post_id field by the student identified by the user_id field.
_start_date (string) “yes” A course or llms_membership post Identifies the date when the student identified by the user_id field enrolled in the post identified by the post_id field. The date will be recorded in the updated_date field on the row.
_status (string) “Enrolled” or “Expired” A course or llms_membership post Denotes the current status of the student identified by user_id in relation to the post identified by post_id. The status is either “Enrolled” or “Expired”.

LifterLMS Course Data

# Top

LifterLMS stores information about a course in the wp_usermeta table.

meta_key Type Description
_llms_audio_embed
string
URL to an oEmbed enable audio URL
_llms_capacity
int
Number of students who can be enrolled in the course before enrollment closes
_llms_capacity_message
string
Message displayed when capacity has been reached
_llms_content_restricted_message
string
Message displayed when non-enrolled visitors try to access lessons/quizzes directly
_llms_course_closed_message
string
Message displayed to visitors when the course is accessed after the Course End Date has passed. Only applicable when _llms_time_period is ‘yes’
_llms_course_opens_message
string
Message displayed to visitors when the course is accessed before the Course Start Date has passed. Only applicable when _llms_time_period is ‘yes’
_llms_enable_capacity
string
Whether capacity restrictions are enabled [yes|no]
_llms_enrollment_closed_message
string
Message displayed to non-enrolled visitors when the course is accessed after the Enrollment End Date has passed. Only applicable when _llms_enrollment_period is ‘yes’
_llms_enrollment_end_date
string
After this date, registration closes
_llms_enrollment_opens_message
string
Message displayed to non-enrolled visitorswhen the course is accessed before the Enrollment Start Date has passed. Only applicable when _llms_enrollment_period is ‘yes’
_llms_enrollment_period
string
Whether or not a course time period restriction is enabled [yes|no] (all checks should check for ‘yes’ as an empty string might be retruned)
_llms_enrollment_start_date
string
Before this date, registration is closed
_llms_end_date
string
Date when a course closes. Students may no longer view content or complete lessons / quizzes after this date.
_llms_has_prerequisite
string
Determine if prerequisites are enabled [yes|no]
_llms_prerequisite
int
WP Post ID of a the prerequisite course
_llms_prerequisite_track
int
WP Tax ID of a the prerequisite track
_llms_start_date
string
Date when a course is opens. Students may register before this date but can only view content and complete lessons or quizzes after this date.
_llms_length
string
User defined coure length
_llms_time_period
string
Whether or not a course time period restriction is enabled [yes|no] (all checks should check for ‘yes’ as an empty string might be retruned)
_llms_video_embed
string
URL to an oEmbed enable video URL

LifterLMS Student Info

# Top

LifterLMS stores custom information for students on the wp_usermeta table.

meta_key Description
llms_last_login Unix timestamp of the student’s last login
llms_billing_address_1 Student’s billing address line 1
llms_billing_address_2 Student’s billing address line 2
llms_billing_city Student’s billing city
llms_billing_state Student’s billing state
llms_billing_zip Student’s billing zip code
llms_billing_country 2-character country code for the student’s billing country
llms_phone Student’s phone number
Last Updated on
Was this article helpful?