Critical CSS WordPress - Render the First Screen Without Waiting (2026)
Critical CSS is the small set of styles needed to show the first screen of a page. Inlining it lets the browser paint straight away, then load the rest of the CSS without blocking.
The Problem Critical CSS Solves
Browsers won't paint a page until they've downloaded and processed the CSS in the head. WordPress themes and page builders often load several large stylesheets covering every possible layout, so visitors wait for CSS that mostly styles things they can't see yet.
PageSpeed Insights reports this under Render blocking requests. It delays First Contentful Paint and often Largest Contentful Paint too.
How Critical CSS Works
Analyze the page
A tool renders the page at common screen sizes and identifies the CSS rules used by elements in the first screen.
Inline those rules
The critical rules are placed directly in the HTML head, so no extra download is needed to paint the top of the page.
Load the rest asynchronously
Full stylesheets load without blocking rendering, then apply to the rest of the page.
Regenerate when designs change
Critical CSS must be updated after theme or layout changes.
Critical CSS vs Removing Unused CSS
Both approaches tackle render-blocking CSS, in different ways.
| Critical CSS (Load CSS Asynchronously) | Remove Unused CSS | |
|---|---|---|
| What's inlined | Styles for the first screen | All styles used on the page |
| Full stylesheets | Still loaded, asynchronously | Not loaded; only used CSS is kept |
| Total CSS downloaded | Unchanged | Much smaller |
| Risk of unstyled flash | Possible if critical CSS misses something | Possible for dynamic elements without safelisting |
| Best for | Sites where Remove Unused CSS causes layout issues | Most sites, especially heavy themes and builders |
| In WP Rocket | Load CSS Asynchronously | Remove Unused CSS |
WP Rocket offers both under Optimize CSS delivery, and you choose one. We'd start with Remove Unused CSS, because it removes the dead weight rather than just deferring it. If a site's dynamic elements are hard to safelist, Load CSS Asynchronously is the gentler fallback. See reducing unused CSS.
Generating Critical CSS on WordPress
| Method | How It Works | Effort |
|---|---|---|
| WP Rocket's Load CSS Asynchronously | Generated automatically through WP Rocket's servers (needs an active license) | Low |
| Other performance plugins | Many generate critical CSS through a cloud service | Low to medium |
| Dedicated critical CSS plugins and services | Paste generated CSS or use an API | Medium |
| Manual generation | Developer tools or build scripts produce per-template CSS | High |
Whichever method you use, generate per template rather than one critical CSS for the whole site. A homepage, a blog post and a product page have very different first screens.
Common Critical CSS Problems
Flash of unstyled content
Something in the first screen wasn't included. Regenerate, or add the missing rules to a fallback.
Layout shift when full CSS loads
Sizes or positions change once the full stylesheet applies. Make sure dimensions are in the critical set.
Outdated critical CSS
After design changes, old critical CSS no longer matches. Clear and regenerate.
Different first screen on mobile
Generate for mobile as well as desktop viewports.
Generation fails
The service can't reach the page because of a firewall, password protection or maintenance mode.
What Goes Into Critical CSS
Critical CSS typically includes styles for:
- The header, logo and navigation bar.
- The hero section or page title area.
- The first paragraphs of content and their typography.
- Layout rules for containers and columns visible in the first screen.
- Fonts and colors used above the fold.
It deliberately leaves out styles for footers, comments, sidebars further down, modals, sliders below the fold and anything that appears only after interaction. That's why it's small: often a few kilobytes instead of hundreds.
How to Check It's Working
View the page source
Logged out, look in the head for an inline style block and stylesheets loaded with a non-blocking pattern.
Run PageSpeed Insights
Render blocking requests for CSS should disappear or shrink.
Watch the filmstrip
In WebPageTest or GTmetrix, the first screen should appear styled, without a flash of plain text.
Test mobile and desktop
Check both, since the first screen differs.
Interact with the page
Open menus and popups to confirm full styles load correctly.
Critical CSS and Page Builders
Page builders generate complex, nested layouts with many classes, which makes critical CSS larger and more fragile. A few tips:
- Generate critical CSS per template, not per page, where your tool allows.
- Regenerate after changing global builder styles or header templates.
- Avoid heavy entrance animations above the fold, which can conflict with asynchronously loaded styles.
- If you see repeated layout issues, try Remove Unused CSS with safelists, or the builder's own CSS optimization, instead.
See speeding up Elementor and speeding up Divi.
Does Critical CSS Still Matter?
Yes, the principle does. Lighthouse 13's Render blocking requests insight still flags CSS that delays the first paint. What's changed is the tooling: performance plugins now generate it automatically, and per-page unused CSS removal has become a popular alternative.
For most WordPress owners, the question isn't "how do I write critical CSS?" but "which CSS delivery option should I enable, and does my layout still look right?"
Checklist Before Enabling CSS Optimization
- Back up or note your current settings.
- Test on staging first if your site earns money.
- Check the header, menu, hero and any popups on mobile and desktop.
- Clear all caches after enabling.
- Keep a list of selectors you add to a safelist and why.
A Worked Example
A page builder site's mobile FCP is slow, and PageSpeed Insights lists three render-blocking stylesheets totaling several hundred kilobytes. Enabling Remove Unused CSS breaks the styling of a popup and a mega menu, which appear only after interaction.
Rather than spend time safelisting, the owner switches to Load CSS Asynchronously. Critical CSS for each template is generated automatically, the first screen paints straight away, and the popup and menu keep their styles because the full stylesheets still load. FCP and LCP both improve noticeably in the lab.
Critical CSS WordPress FAQ
What is critical CSS?
The CSS needed to display the first screen of a page. It's inlined in the HTML so the browser can paint without waiting for full stylesheets.
Is critical CSS better than removing unused CSS?
Not usually. Removing unused CSS cuts the total CSS too. Critical CSS is a good alternative when removing unused CSS causes layout issues.
Does WP Rocket generate critical CSS?
Yes. Its Load CSS Asynchronously option generates critical CSS automatically, using WP Rocket's servers with an active license.
Do I need to regenerate critical CSS?
Yes, after theme updates or design changes. Plugins usually do this when you clear the relevant cache.