Watch on YouTube.
Is your LearnPress course website loading too slowly? A slow site can frustrate students and hurt your sales.
In my latest video, I show you how to take a WordPress LMS from a slow 83 score to a lightning-fast 99 on PageSpeed Insights.
The Problem
Most LMS sites are weighed down by over 30 different JavaScript files. This creates “render-blocking” issues that make your pages feel stuck while loading.
The Solution
While some lazy-load plugins can break your course curriculum, I found that using Autoptimize is the safest way to fix this. By “deferring” scripts, the page loads first, and the heavy code follows right after—without breaking your quizzes or lessons.
Lazy loading JavaScript didn’t work in this case because LearnPress uses libraries (lodash, react) built into WordPress and inline scripts relying on those libraries. All of them need to execute in order of appearance on page.
Key Steps to Fix It:
- JavaScript Deferring: Set your scripts to load asynchronously (not blocking) and execute in the correct order so you don’t see “not defined” errors.
- CSS Inlining: Put your styling directly into the page code to reduce the number of requests.
- Simple Caching: Use a lightweight plugin like Cache Enabler to save server power.
By following these steps, I reduced the “Largest Contentful Paint” from 3.8 seconds down to just 2 seconds!
Want the full guide? Watch the video above to see my exact settings!
What is next:
- Improve general WordPress PageSpeed (using JS lazy loading)
- Fix Elementor PageSpeed (using JS lazy loading and inlining CSS)