Lw lms learndash migration

From Lonsdale201/wp-agent-skills · View interactive version

Lw lms learndash migration is an AI agent skill from the GitHub repository Lonsdale201/wp-agent-skills. Plans, runs, or reviews the LW LMS 2.0.0 WP-CLI LearnDash migration command `wp lw-lms migrate-learndash`. Use when migrating `sfwd-courses` or `sfwd-lessons`, checking `--dry-run` and `--verbose`, verifying `_lw_lms_migrated_to`, sections, order, WooCommerce product links, video extraction, or safe

How to use this skill

Skill file

LW LMS LearnDash Migration

Use this for the one-time WP-CLI migration from LearnDash post types into LW LMS. The command copies course and lesson posts, maps key metadata, then builds a single LW LMS section per migrated course using LearnDash lesson order.

Verified against LW LMS 2.0.0. The quiz, drip, React admin, privacy, and access changes through 2.0.0 did not extend the migrate-learndash flow. Use lw-lms-wp-cli-operations for non-migration commands.

When to use this skill

Trigger this skill when ANY of the following is true:

Command

wp lw-lms migrate-learndash --dry-run --verbose
wp lw-lms migrate-learndash --verbose

The command is registered in Plugin::register_cli_commands() as lw-lms migrate-learndash. It runs only under WP-CLI.

Workflow

  1. Confirm both source and target plugins are present enough for data access: LearnDash data exists in sfwd-courses; LW LMS classes are active.
  2. Take a database backup. This command creates posts and writes mappings; it does not implement rollback.
  3. Run --dry-run --verbose. Review course count, lesson count, and skipped items.
  4. Run the real migration once.
  5. Verify mappings and frontend behavior before deleting or disabling LearnDash.

What gets migrated

| Source | Target | Notes |

|---|---|---|

| sfwd-courses posts | course posts | title, content, excerpt, status, slug, menu order, thumbnail |

| LearnDash course price type | _lw_lms_access_type | mapped by LearnDashData::map_access_type() |

| Woo product links | _lw_lms_product_ids | reads direct _related_course, _membership_product_id, and postmeta reverse lookup |

| kurzus-hossza | _lw_lms_duration | local/custom duration meta supported by current migrator |

| sfwd-lessons posts | lesson posts | title, content, excerpt, status, slug, menu order, thumbnail |

| lesson course_id | _lw_lms_lesson_course_id | resolved through _lw_lms_migrated_to course mapping |

| LearnDash video URL, Elementor video, content embeds | _lw_lms_video | extracted by VideoExtractor |

| ld_course_steps lesson order | _lw_lms_course_sections, _lw_lms_lesson_section_id, _lw_lms_lesson_order | one generated section per migrated course |

Each migrated LearnDash post gets _lw_lms_migrated_to = <new_id>.

Rerun behavior

The command is intentionally rerunnable, but not a full synchronization tool:

Verification checklist

Critical rules

Cross-references

What this skill does NOT cover

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.