Introduction #
Using a Content Delivery Network (CDN) to serve your media files such as images, documents, and videos improves app speed and reduces server load by routing traffic through faster, globally distributed edge servers.
This guide walks you through enabling API CDN in your LearnDash App, setting your CDN URL, and optimizing performance through seamless media delivery.
Enabling the API Performance Component #
- In your WordPress admin, go to LearnDash App > Components.

- Toggle on API Performance.

- Click Save Changes.
Configuring Your CDN URL #
- Navigate to LearnDash App > Settings > API CDN.

- Check Enable API CDN.

- Check Enable API CDN.
- Enter your CDN base URL (without a trailing slash).
- Click Save Changes.
Note: Use the CDN URL provided by your service (e.g., CloudFront, StackPath, BunnyCDN).
How the API CDN Works #
- First Request: The app fetches media from your WordPress site and uploads it to your CDN.
- Subsequent Requests: The media is served via your CDN’s domain, reducing latency.
- Offline Courses: If LearnDash offline mode is enabled, media downloads come from the CDN as well.
Integrations & Best Practices #
- Vimeo Integration: For secure offline LearnDash videos, use the [Vimeo integration] (requires Vimeo Pro).
- API Caching: For optimal performance, combine API CDN with API Caching. See our caching tutorial for configuration steps.
Troubleshooting and FAQs #
Q: Why is my media still loading from the origin server?
A: Double-check that Enable API CDN is toggled on and your CDN URL is correct (no trailing slash).
Q: My CDN isn’t showing new media files.
A: Clear any plugin/CDN caches, then access the media in the app to trigger syncing.
Q: I’m getting errors when saving the CDN URL.
A: Make sure the URL uses HTTPS and your server can reach the CDN provider.
Q: Media for offline courses isn’t downloading.
A: Confirm both Enable API CDN and LearnDash Offline Courses are active. Also ensure your CDN files are publicly accessible.
Q: Can I exclude certain file types from the CDN?
A: Not from the app settings. Use your CDN provider’s custom rules or URL patterns to filter asset types.