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.

For demo users, you can export your progress and import it when you purchase LearnDash or LearnDash Cloud.

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 provides limited assistance in this task and only when using the built-in import/export tool, otherwise, we may not be able to help troubleshoot any issue encountered. We strongly recommend you practice the transfer to a development site first before attempting to do so on a live site.

Using the Built-in LearnDash Import/Export

LearnDash has now introduced a new Import/Export feature to allow you to easily import/export your entire LearnDash site, data, configuration, and settings to another site. This is now the recommended option when importing/exporting your existing LearnDash site to another or new site.

To use this feature:

  1. Navigate to LEARNDASH LMS > Settings
  2. Click on the “Advanced” tab
  3. Click on Import/Export

Exporting

On this page, you can fine tune what you want to export from your LearnDash site. To export:

  1. Select what data you want to export. “Everything” includes all of the data and settings on the site.
  2. “I want to select” allows you to pick, choose, and customize the export. You have the option to export:
    1. Courses
    2. Lessons
    3. Topics
    4. Quizzes
    5. Questions
    6. Transactions
    7. Groups
    8. Assignments
    9. Essays
    10. Certificates
    11. Coupons
    12. Users
    13. Others
  3. You can also select to export either just the posts, the settings, or both.
  4. Once done click on the export button.
  5. After that the button will grey out and show “Export in progress”, just wait for this to complete.
  6. Once done, you’ll see a link to download the export on the top part of the page
  7. Once you click on download, you’ll get a .zip file containing all the information you just selected.

Importing

You can import the data that you just exported using this feature to another LearnDash site using the import feature.

  1. On the Import/Export page, under “What do you want to import?”, select the .zip file from a previous export.
  2. Once selected, click on Import
  3. You will see a message that says “Import is in the processing queue. Please reload this page to see the import status.”
  4. Wait for the import to finish. You can refresh the page to see the status.
  5. Once done, you will see a message that says “Import completed successfully.”
  6. At this point, everything that you’ve exported will have been imported successfully to the new LearnDash site. All the course, lessons, topics, quizzes, and group associations will be kept, and all the settings (if you’ve chosen to export them) will be applied.

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.

LearnDash Database Screenshots

From the screenshot the top-level key 24978 (shown by the red arrow) is 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 24978 for example. This course has 1 lesson indicated by the 24980 key 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 24980, 24982. 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. 25000 and 24988) 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.

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.

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.

NOTE
You can also use the Import and Export Plugin for LearnDash by Immerseus to easily transfer courses from one site to another using a plugin.

Was this article helpful to you?

How can we help?