Skip to content
LearnDash Support
  • Products

      LearnDash LMS Plugin

      Powering intuitive online courses with advanced management and engagement features for WordPress.

      Learn More

      LearnDash LMS Plugin + Hosting

      StellarSites Learning is a fully managed hosting solution for WordPress.

      Learn More

      Premium LMS Add-ons
      Enhance your courses with extra features. Gather insights, reward learners, protect your course content, and more!

      Explore all Add-ons

      MemberDash
      The most flexible membership plugin for WordPress. Monetize your content and build a community.

      View MemberDash

  • Pricing
  • Add-ons & Integrations

      LEARNDASH ADD-ONS

      Instructor Role

      Empower Instructor to manage courses.

      Groups Management

      Organization management, delegation and more

      ProPanel

      Advanced analytics reporting.

      Gradebook

      Track progress and create report cards.

      Notes

      Enable notetaking and two-way communication.

      Rating, Reviews, & Feedback

      Build trust and gain valuable insights.

      FEATURED INTEGRATIONS

      The Events Calendar

      Connect with the most popular events solution.

      BuddyBoss

      Powerful tools for an enhance learning experience.

      WooCommerce

      The most popular shopping cart on WordPress.

      WeGlot

      Translate your LearnDash content.

      All Integrations

      BUNDLES

      Package and save
      Save when you buy multiple plugins in a bundle.

      See all bundles.

      MORE

      Release Notes

      Get Help

  • Resources
      LearnDash Academy Videos, webinars, and resources to help you launch a successful course.
      Blog Blog
articles with the latest news and tips to help you run high-quality courses.
      Knowledge Base A support network to help you make the most of your courses.
      Release Notes Stay up-to-date with the latest updates to LearnDash.
      Get Help

      Professional Services

      LMS Site Development Get hands-on assistance launching your course website.
      Website Maintenance WordPress management made easy.
      SEO Services SEO solutions that accelerate growth.

      Other Resources

      LearnDash Accessibility At LearnDash, we believe online learning should be accessible to everyone.
      Join the Dev Club
  • Demo
  • Sign In
Get LearnDash

Knowledge Bases: Support Home | LearnDash Core | LearnDash Add-ons | LearnDash Cloud | Resources | Mobile App

LearnDash Support
  • ← Return to LearnDash
  • Support
    • Support Home
    • All Knowledge Bases
    • LearnDash Core
    • Add-ons
    • Resources
    • Cloud
  • My Account
Popular searches: api duplicate couse email gp query loop [ld_course_resume]

Account & Billing

6
  • Edit Your Customer Account Email and Password
  • License
  • Updates
  • How To Get Help
  • Billing
  • LearnDash Licensing & Management

Troubleshooting

2
  • Troubleshooting Basics
  • Why is the registration form not showing?

User Guides

9
  • How do I remove the ‘Take This Course’ button?
  • How do I hide post meta data (date, author, comments, etc.)?
  • Translation
  • Transferring LearnDash Courses
  • How do I protect my course files & downloads?
  • User Guides
  • LearnDash Migration
  • How to Install and Activate LearnDash Add-ons
  • Trusted Login

FAQs

30
  • Can I hide the course content table on the course page?
  • Can I create a unique sidebar for courses, lessons & quizzes?
  • Can I rename “courses,” “lessons,” “topics,” and “quizzes”?
  • Can I reuse lessons & topics across multiple courses?
  • Is LearnDash compatible with other plugins?
  • How do I find the course ID?
  • 404 Errors on LearnDash Pages
  • What kind of media can be used in LearnDash courses?
  • Does LearnDash support Learning Tools Interoperability (LTI)?
  • How can I make email notifications send on time?
  • I’m getting the error “the link you followed has expired” when installing LearnDash.
  • Questions about MemberDash?
  • Known Issues & Conflicts
  • Why is the registration form not showing?
  • Page Builders + LearnDash
  • Why are the license updates and license checks disabled?
  • FAQs
  • Your Add-Ons and Plugins are Officially Migrating to LearnDash FAQs
  • WisdmLabs Acquisition FAQ
  • How to Manually Install and Update Plugins from WordPress.org
  • What is the best way for me to bundle courses using LearnDash?
  • What plugins can be used with LearnDash for math equation editing?
  • Do I need a plugin to do drip feeding?
  • Can I use the same Stripe Purchase Button on multiple courses?
  • Is there a shortcode for displaying a single lesson in LearnDash?
  • Is there a way to export an individual course?
  • What should I do if my course content is not displaying correctly?
  • Moving Away from LearnDash Cloud
  • What steps can I take if a lesson or topic is not marked as complete?
  • What are the different user roles in LearnDash and what permissions do they have?

Developers

3
  • Adding Fields to LearnDash Registration Forms with Advanced Custom Fields (ACF)
  • Developers
  • Protecting Files
View Categories
  • Home
  • All Knowledge Bases
  • Resources
  • Developers
  • Protecting Files

Protecting Files

In some situations, only specific users should be able to download or access files on a website. File protection helps prevent direct access to sensitive files while still allowing LearnDash features to function as intended. LearnDash stores certain files in the following directory on the web server:

/wp-content/uploads/learndash

These files may include exports or other system-generated assets that should not be publicly accessible.

The most common way to protect these files depends on the web server in use:

  • Apache servers use an .htaccess file
  • Nginx servers use rules inside a server configuration file

Protecting Files on Apache Servers #

How It Works #

Apache allows directory-level access control using an .htaccess file. This file is placed directly inside the directory that needs protection.

When configured, the server blocks direct access to files in that directory.

Steps #

  1. Locate the directory that should be protected (for example:
    /wp-content/uploads/learndash).
  2. Create a file named .htaccess inside that directory.
  3. Add the following rules to the file:
Order Allow,Deny
Deny from all

These rules prevent files in the directory from being downloaded or accessed directly via a browser.

Additional Resources #

For a full overview of .htaccess functionality and supported directives, refer to the official Apache documentation:
https://httpd.apache.org/docs/2.4/howto/htaccess.html

Protecting Files on Nginx Servers #

How It Works #

Nginx does not use per-directory configuration files like .htaccess. Instead, access rules are managed from a central server configuration file.

Directory protection is handled using location blocks.

Basic Rule Example #

To deny access to a specific directory, add the following rules to the appropriate server configuration file:

deny all;
return 403;

This configuration blocks all direct access and returns a 403 Forbidden response.

LearnDash Export Directory Example #

To protect files generated by the LearnDash Import/Export feature, add the following block:

location "/wp-content/uploads/learndash/export" {
    deny all;
    return 403;
}

This ensures exported LearnDash files cannot be accessed directly from the browser.

Additional Resources #

For a full overview of Nginx configuration options, refer to the official Nginx documentation:
https://www.nginx.com/resources/wiki/start/topics/examples/full/

Server File Protection vs REST API Access (LearnDash 5.0) #

Server-level file protection applies only to direct file downloads. It does not affect access through the LearnDash REST API.

Key points:

  • Server rules (.htaccess or Nginx) block direct file URLs
  • REST API endpoints remain available at:
    /wp-json/ldlms/v2/
  • API access is controlled by REST permissions, not server file rules
  • Tools using WP Application Passwords authenticate through the REST API

File protection and API permissions work independently and should be configured based on the access requirements of the site.

Next Steps #

  • Review REST API permissions separately if API access needs to be restricted
  • Confirm the server type (Apache or Nginx) with the hosting provider
  • Test file access after applying rules to ensure LearnDash features continue working as expected

Updated on February 5, 2026
Developers
Table of Contents
  • Protecting Files on Apache Servers
    • How It Works
    • Steps
    • Additional Resources
  • Protecting Files on Nginx Servers
    • How It Works
    • Basic Rule Example
    • LearnDash Export Directory Example
    • Additional Resources
  • Server File Protection vs REST API Access (LearnDash 5.0)
  • Next Steps

Was this Doc Useful?

Thanks for your feedback!

Products

  • LearnDash LMS Plugin
  • MemberDash Plugin
  • LearnDash Cloud
  • ProPanel
  • Groups Management
  • Gradebook
  • Notes
  • Integrations

Support

  • Contact Us
  • Experts
  • Documentation
  • Facebook Community

Company

  • About LearnDash
  • Brand Assets
  • Careers
  • Affiliates
  • Privacy Policy
  • Terms and Conditions
  • Refund Policy

Our Partners

  • The Events Calendar
  • MemberDash
  • Kadence
  • GiveWP
  • Iconic
  • SolidWP

Stay Connected Subscribe to our newsletter
  • YouTube
  • X
  • Facebook
  • Instagram

Copyright 2026. All Rights Reserved.

A Liquid Web Brand
WordPress Hosting Services
© 2026 All Rights Reserved

StellarWP
liquidweb