Skip to content

LearnDash on WordPress — setup and common issues

A WordPress LearnDash operational guide covering the course-lesson-topic hierarchy, the progress tracking table, the quiz engine pitfalls, and the common issues that show up post-launch.

LearnDash on a WordPress site is the dominant LMS plugin and one of the largest single plugins by table count and hook surface. The setup is methodical — courses contain lessons contain topics contain quizzes — and the common issues are not setup mistakes but operational ones that show up after the first few hundred learners enroll.

What’s happening

LearnDash uses custom post types (sfwd-courses, sfwd-lessons, sfwd-topic, sfwd-quiz, sfwd-question) plus its own progress tracking tables (wp_learndash_user_activity, wp_learndash_user_activity_meta). Every quiz attempt, lesson completion, and topic view writes a row to the activity table. A site with 5,000 learners completing one course per week generates ~25,000 activity rows per week. After a year, the activity tables can hold a million rows each, and admin reports start timing out.

How to verify

Inspect the LearnDash data shape:

wp post list --post_type=sfwd-courses --format=count
wp post list --post_type=sfwd-lessons --format=count
wp post list --post_type=sfwd-quiz --format=count
wp db query "SELECT activity_type, COUNT(*) FROM wp_learndash_user_activity GROUP BY activity_type"
wp db query "SELECT COUNT(*) FROM wp_learndash_user_activity_meta"

Check the course access mode (open, free, buy now, recurring, closed) for each course:

wp db query "SELECT p.ID, p.post_title, pm.meta_value FROM wp_posts p JOIN wp_postmeta pm ON pm.post_id = p.ID WHERE p.post_type='sfwd-courses' AND pm.meta_key='_sfwd-courses' AND p.post_status='publish'" | head

Pull recent quiz failures to spot grading issues:

wp db query "SELECT user_id, post_id, activity_started, activity_completed FROM wp_learndash_user_activity WHERE activity_type='quiz' AND activity_completed=0 AND activity_started > UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 30 DAY))"

The fix

The setup pattern that works:

  1. Course Builder, not manual lesson assignment. LearnDash 3.0+ has a Course Builder that handles the parent-child relationships properly. Avoid manually setting course_id on lessons.
  2. Course access mode at the course level, not per-lesson. Mixing access modes within a course confuses the progress engine and breaks the prerequisite logic.
  3. One quiz per topic, not per lesson. Quizzes attached at the topic level let learners retake without resetting the parent lesson’s completion state.
  4. Use Groups for cohorts, not Users for individual assignments. Group-based access scales — assign a course to a group of 500 learners with one click. Per-user assignment scales linearly and gets ugly.

Common issues and the fix:

  1. Quiz scores not saving. Almost always Action Scheduler backlog or PHP timeout during quiz submission. Increase max_execution_time to 60 on the quiz endpoint, audit the Action Scheduler queue with wp action-scheduler queue.
  2. Progress not updating. The wp_learndash_user_activity row is created but activity_completed stays 0. Cause is usually a custom theme overriding learndash_mark_complete(). Disable theme overrides via LEARNDASH_TEMPLATE_OVERRIDE to confirm.
  3. Admin reports timing out. Activity tables too large. Archive activity older than 24 months to a separate table, or use the LearnDash reporting cache plugin to pre-compute aggregates.
  4. Drip content not releasing on schedule. WP-Cron not firing reliably. Replace WP-Cron with system cron — wp cron event run --due-now from crontab -e every 5 minutes.
  5. Certificates not generating. PDF generation library (mPDF or similar) hitting memory limit. Increase PHP memory_limit to 512M for the certificate generation request specifically.
  6. Login redirect after enrollment broken. Custom login redirect plugin conflict. LearnDash sets redirect_to on enrollment; if another plugin overrides it, learners land on the dashboard instead of the course.

Stack Harbor runs LearnDash on the Enterprise WordPress operating model with Action Scheduler monitored, the activity tables archived on a schedule, and the certificate generation path resource-isolated. If your LearnDash install is producing slow reports or missing progress events, book a consult. The Enterprise WordPress team handles LearnDash operations as a first-class workload.