1. Home
  2. Docs
  3. Developers
  4. Transferring LearnDash Courses

Transferring LearnDash Courses

There are a two ways to transfer (or move) LearnDash courses from one site to another. The method you use depends on whether or not you need to retain existing user data or just move the course content.

Transferring Courses WITHOUT Data

If you just want to move course content from one site to another, then this can be done using the Export and Import options under the TOOLS menu in WordPress. Use this for all custom post types except for quizzes.

Note that this process will not retain the associations between courses and lessons; after the import you will need to connect your lessons to the appropriate courses again, which can easily be done using the Course Builder.

To export quizzes…

  1. Navigate to LEARNDASH LMS > QUIZZES
  2. Click on the Actions menu in the header
  3. Select Import/Export
  4. Select the quizzes you want to move

This is the same process for importing the quizzes onto the new site.

Transferring Courses WITH Data

If you want to move a LearnDash course to another site and retain all of the user progress/data, then the process for doing so is more elaborate and should only be done by a capable developer.

Please note that LearnDash support does not provide assistance in this task, nor will we help troubleshoot any issues encountered. We strongly recommend you practice the transfer to a development site first before attempting to do so on a live site.

If you would like assistance with this process then we recommend this firm. Or you can post the project on codeable to get a free quote.

Database Considerations

The course progress LearnDash stores as part of the user_meta must match the post ID number for the related Course, Lesson, Topic and Quiz.

Within the wp_usermeta table you have rows related to specific user_id. These are key/value pairs. Within these various key/value pairs there are a few user by LearnDash to track user Course and Quiz progression.

For the Courses the meta_key will be named '_sfwd-course_progress' and the meta_value will be a serialized array.

This array when expanded will contain references to the Course ID (matching the course post ID), also Lesson ID, Topic ID, etc. There will also be an indicator to show if the user completed that step in the course. Here is a screenshot of the array.

From the screenshot the top-level keys 2584, 2289, 672 (shown by the red arrows) are the Course ID and must match the existing course post ID. Within each course section you will have sub-sections for ‘lessons’ and ‘topics’.

Take the course 672 for example. This course has 5 lessons indicated by the 675, 699, 701, 701, 705 keys within the ‘lessons’ sub-section. The ‘1’ on each key indicates the user completed this lesson.

Within the ‘topics’ sub-section you will see the first tiers 675, 699, 701. These are lesson IDs and must match the same lesson ID from the ‘lessons’ sub-section.

Within each ‘topics’ lessons section you will see the topic ID (ex. 677, 679, 681) and the ‘1’ indicating the topic was complete.

Below the ‘lessons’ and ‘topics’ sub-sections’ you will also see the keys ‘completed’ and ‘total’. This is the completed steps and total steps of the course.

Outside of this one user meta key/value pair there is another set for user Quiz progress. However, this array structure is very different.

Within the user meta table for each user there are also other key/value pairs user by LearnDash to track the user. These are somewhat less important than the Course ( _sfwd-course_progress ) and Quiz ( _sfwd-quizzes ) progress items. Here is a screenshot showing some of the used key/value pairs.

Additional items to consider for the transfer include…

learndash_group_users_XXX – Used to indicate the user is assigned to a Group. The ‘XXX’ on the key will match the meta_value. A user can be associated with many groups.

learndash_course_expired_XXX – Used to indicate when user access to a course has expired.

course_completed_XXX – A secondary record to the course progress. Used to indicate the when the user completed the course.

Was this article helpful to you?
Yes
No

How can we help?