How to Run LifterLMS Database Updates

Overview

# Top

From time to time after updating LifterLMS, a database upgrade will be necessary. LifterLMS will prompt you to run these updates and they will run in the background and notify you when finished.

dashboard__local_-_wordpress

Theses updates are usually minor but may be large. Below are a list of updates being made in each database upgrade.

As always, it is highly recommended that you make a backup of your database prior to running an update!

FAQ: My Database Update Isn't Running

# Top

The background updater in LifterLMS utilizes WP_CRON to process database updates in the background and allows you to go about your business instead of waiting for a loader to finish.

If you’re update doesn’t appear to be running or if it is taking too long you can trigger the update to run manually by clicking the link that says “Taking too long? Click here to run the update now.” By clicking this link, the updater will manually run updates that would normally be queued in the background. Since a particular database upgrade may include multiple update functions, you may need to click this link multiple times for the update to fully complete.

You may also consider creating a real cron to ensure that background updates (and other key LifterLMS features) are always running on a timely schedule. You can learn how to create a real cron here.

Database Upgrade Logger

# Top

The background updater will log notes about the status, progress, and issues with background updates.

Locating the Logger

The log file is saved on your server at wp-content/uploads/llms-logs/updater-{secure_string}.log

The “{secure_string}” will be a string of unique random characters which are added to prevent guessing of the files location.

Disabling the Logger

The logger is enabled by default and can be disabled by adding the following to your wp-config.php file above the comment that says /* That's all, stop editing! Happy blogging. */

Version 3.16.0

# Top

Duplicates questions and quizzes so that quizzes are only ever associated with a single lesson and questions are only ever associated with a single quiz.

Migrates student quiz attempt data to the new lifterlms_quiz_attempts table.

Updates relationships between quizzes and lessons to be bi-directional.

Updates various quiz, question, and choice metadatas.

There is a very large amount of data being updated during this migration. While most LifterLMS database updates take a few minutes or less, it’s possible for this upgrade to take 15 minutes or longer. The progress bar reports a rough progress and may appear stuck during portions of this upgrade. More than likely your upgrade is not stuck but working on one of the larger portions of the migration which may take several minutes to complete. To see actual progress refer to the upgrade log.

Version 3.13.0

# Top

This database update will automatically create new instructor-related post metadata for LifterLMS courses and memberships.

The post author of each course and membership will be used to generate the initial default information for the instructors.

Version 3.12.0

# Top

This database update will calculate and store recurring subscription end (last payment) dates for all orders which have a pre-defined billing length. Prior to LifterLMS 3.10 this date was calculated dynamically. Since LifterLMS 3.10 the end date is stored in the database and referenced whenever a new payment is scheduled. If the next payment date would be after this end date, the subscription is considered “completed” and no more payments are scheduled. This update should have been included with LifterLMS 3.10 but was not, resulting in any order created before 3.10.0 with a billing length from not having an end date stored. All orders created after 3.10 are unaffected by this issue. After the migration, any order which should have been completed already will now be recorded properly as completed an no more payments will be attempted.

Version 3.8.0

# Top

LifterLMS 3.8.0 introduces Access Plan visibility settings and this database upgrade automatically migrates access plans from older version to the new data format.

In previous versions access plan visibility was either “visible” or “featured” and the data was stored on the wp_postmeta table. LifterLMS 3.8.0 adds “hidden” as a possible option.

In 3.8.0 “visibility” is moved from the wp_postmeta table to a custom taxonomy. This migration will remove all wp_postmeta data and add all access plans to their correct taxonomy.

Version 3.6.0

# Top

LifterLMS 3.6.0 introduces course and membership visibility settings. This database upgrade adds default visibility settings to all existing courses and memberships.

All courses will be automatically configured to be visible in the catalog only. Prior to LifterLMS 3.6.0 courses were not searchable. Courses created after 3.6.0 will be searchable by default. If you wish to make your existing courses searchable run the database upgrade and then use the bulk editor to change the visibility of all your courses to be Catalog & Search.

All memberships will be automatically configured to be visible in both catalog and search.

 

Version 3.3.0 & 3.4.3 Notes

# Top

Postmeta key names for LifterLMS Lessons and Sections have been updated to reflect the naming convention established in LifterLMS 3.0 for all postmeta keys.

For both lessons and sections, the key name _parent_course has been renamed _llms_parent_course.

For lesson, the key name _parent_section has been renamed _llms_parent_course.

This database update will rename all keys automatically to reflect the new naming convention.

If you do not run this update it will appear like your Sections and Lessons have been deleted from your Courses. Do not panic! Nothing is deleted or lost! Since this updates relationships all your lessons and sections will be restored after running the upgrade.

This update was originally included in version 3.3.0 but has been moved to 3.4.3. In 3.4.3 the background updater was rewritten to address issues that prevented some users from running database upgrades. If you sucessfully ran the 3.3.0 update you will be prompted to run the 3.4.3. Since the upgrade has already sucessfully run nothing will actually change when running the upgrade a second time. If, however, you were unable to run the 3.3.0 script, it will correctly run this time.

Version 3.0.3 Notes

# Top

Users registered in LifterLMS versions 3.0.0 to 3.0.2 were registered as “studnets” rather than “students.”

This update will automatically remove this incorrect role from all users with the role and replace it with the correct role “student”.

Users affected by this issue would display “None” for their role on the WordPress admin panel. Post update those affected students will correctly display “Student” for their role.

Version 3.0.0 Notes

# Top
  • Up to three access plans will be automatically generated for each published course and membership
    • Access Plans are new in LifterLMS 3.0 and allow you to create various subscription and one-time payment plans for customers to use to gain access to your courses and memberships.
    • A one-time payment access plan will be created if a single price is set for the course or membership
    • A recurring payment access plan will be created if a subscrpition price is set for the course or membership
    • If a course is restricted to a membership, a FREE members-only access plan will be created
  • Options which are deprecated and no longer used by LifterLMS will be removed from the database
  • Options for account, checkout, and registration fields will be moved to their new equivalents. You’ll likely want to visit the new settings available for these fields and make some modifications yourself. Checkout LifterLMS Settings -> Accounts for more information.
  • Meta data (like course restrictions and video custom fields) for courses, lessons, coupons, and emails will be updated to follow a predictable and standardized naming convention in the database
  • Data associated with existing LifterLMS orders will be migrated to the LifterLMS 3.0 data structure and marked as “Legacy Orders”. See LifterLMS Orders for more information on orders in LifterLMS 3.0

We recommend waiting for this upgrade to complete before making any changes to your LifterLMS content and settings. Updates to courses, memberships, and other LifterLMS content types will happen 50 at a time. Most updates should finish in less than 5 minutes. If you have more than 500 courses or memberships, expect it to take longer. A site with few courses but many lessons will move quicker than a site with many courses.

Last Updated on
Was this article helpful?