Skip to Content

How to Purge Critical CSS in Trellis

How to easily purge and regenerate your Critical CSS.

You may sometimes need to purge and regenerate your Critical CSS to solve for a display issue, or to troubleshoot an issue with Critical CSS serving on a certain page.

Here is the easy process for how to get this done!

How to Purge and Regenerate Critical CSS

Log into your WordPress Admin and scroll over to Manage Trellis JS/CSS in the top admin bar.

If the display issue is happening on most or all pages, Purge All Critical CSS (also click Reset All Critical CSS if the option is available).

If the issue is happening on just one page or a handful of pages, click Purge Page CSS and Reset Page CSS on each affected page.

Once that’s done, clear the cache from your caching plugin.

Trellis will regenerate your Critical CSS as readers visit your site, so it will take a bit of time. One way to verify if regenerating Critical CSS has worked is to visit an affected post in an incognito window. If you then visit that same post while logged in, you should see a Critical CSS status message in the top admin bar. The status will should change to Critical CSS – Processing soon after visiting the post in incognito.

After some time has passed, if you refresh after it’s successfully regenerated, you should see Critical CSS – Success!

Once that’s done, you’ll know Critical CSS has regenerated for that particular post and you should be all set. If you selected Purge All, Critical CSS will continue to regenerate for all other posts as more readers visit your site.

Additionally, in the Critical CSS tab of your Trellis settings, you can click the Purge All Critical CSS button:

If after 24 hours the status never changes to Critical CSS – Success or if the issue persists after a successful regeneration, you can email our support team at [email protected]. Our team may need to dive in deeper to check for other potential conflicts.