Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Speed & performance · Info

WP Rocket Divi Settings Explained: What Each Option Does

WP Rocket Divi Settings Explained: What Each Option Does

Short answer

With Divi, turn on WP Rocket page caching, minification, lazy loading and preloading, then test Remove Unused CSS and Delay JavaScript carefully. Avoid running overlapping features twice, such as Divi Critical CSS with WP Rocket CSS delivery, or Divi jQuery deferral with WP Rocket script deferral.

Key takeaways

  • Let WP Rocket handle caching and most file optimization.
  • Keep Divi Dynamic CSS on, but avoid doubling up Critical CSS.
  • Test Remove Unused CSS on staging for missing module styles.
  • Exclude above-the-fold scripts and hero images from delay and lazy load.
  • Change one setting at a time and clear both caches.

What are the best WP Rocket settings for Divi?

The best WP Rocket settings for Divi turn on page caching, CSS and JavaScript minification, lazy loading and preloading, while avoiding duplicate features that Divi already handles in its own performance options.

WP Rocket and Divi both include speed tools. Divi has Dynamic CSS, Critical CSS, deferred jQuery and other options. WP Rocket has Remove Unused CSS, Delay JavaScript execution and caching.

Problems start when both tools try to do the same job. You can end up with broken layouts, missing animations or menus that do not open.

The aim is simple. Let WP Rocket handle caching and most file optimization, and let Divi handle the features that are built into its framework.

WP Rocket publishes a page on using Divi with WP Rocket that lists the compatibility it applies automatically. Check it after major updates, since both products change often.

WP Rocket settingSuggested starting point with DiviWhy
Page cache and mobile cacheOnCore speed gain, safe with Divi
Minify CSSOnLow risk
Remove Unused CSSTest on stagingBig gain, can strip Divi module styles
Load CSS AsynchronouslyUse if you skip Remove Unused CSSAlternative to Divi Critical CSS
Minify JavaScriptOnLow risk
Load JavaScript deferredOn, test menus and slidersCan conflict with Divi's defer jQuery
Delay JavaScript executionOn, with exclusions if neededCan delay animations and menus
Lazyload images and iframesOnExclude above-the-fold hero images
Preload cacheOnKeeps cache warm after clears

Which Divi performance options should you check first?

Open Divi, then Theme Options, then General, then Performance, and review Dynamic CSS, Critical CSS, Dynamic JavaScript Libraries and Defer jQuery before you change WP Rocket.

These options make Divi load only the styles and scripts each page needs. Elegant Themes explains the idea in its guide to the Dynamic CSS feature.

Dynamic CSS and Dynamic Module Framework should usually stay on. They reduce the CSS Divi loads and do not overlap much with WP Rocket.

Critical CSS overlaps with WP Rocket's CSS delivery features. Many site owners turn off one of them, then compare speed scores, rather than running both.

Defer jQuery And jQuery Migrate overlaps with WP Rocket's JavaScript deferral. If menus or sliders break, turn one of these off first.

The Divi Theme Options documentation lists every option. Divi 5 reorganized some settings, so labels may differ on newer versions.

How should you set WP Rocket's cache options with Divi?

Turn on mobile caching and, if your site shows different content on phones, the separate cache for mobile devices, because Divi layouts are responsive and work with a shared cache in most cases.

Divi uses CSS media queries for responsive design, so the same HTML works on phones and desktops. A single cache is usually fine.

If you use plugins that serve different HTML to mobile users, turn on the separate mobile cache. Our guide on WP Rocket mobile cache problems explains when that matters.

Keep cache lifespan at the default unless your content changes very often. WP Rocket also clears the cache when you update posts, and its Divi compatibility clears cache when layouts change.

Should you use Remove Unused CSS with Divi?

Remove Unused CSS can make Divi pages much lighter, but it sometimes removes styles that Divi modules add on interaction, so test it carefully on staging first.

Divi sites load a lot of CSS, so this feature can give a big speed gain. The risk is that styles for hover states, toggles, tabs or popups are removed because they are not visible on first load.

If something looks wrong, add the missing CSS selectors or files to the safelist in WP Rocket. Our guide on Remove Unused CSS not working walks through that process.

If you cannot get it stable, turn it off and use Load CSS Asynchronously instead. That option generates critical CSS for the visible part of the page.

How should you set JavaScript options for Divi?

Turn on Minify JavaScript and Load JavaScript deferred, then test Delay JavaScript execution with exclusions for Divi scripts that run above the fold.

Delay JavaScript execution waits until the user interacts before running scripts. That improves Core Web Vitals scores, but Divi animations, mobile menus and sliders may not work until the visitor moves the mouse or taps.

If your header menu or hero animation needs to work right away, add an exclusion for the related Divi script. Our guide to WP Rocket delay JavaScript exclusions shows how to find the right file names.

Avoid stacking deferral features. If Divi defers jQuery and WP Rocket also defers and delays scripts, a dependency may load in the wrong order.

How should you set media options with Divi?

Turn on lazy loading for images and iframes, but exclude the main hero image or background so it loads straight away.

Lazy loading the first large image hurts Largest Contentful Paint. Add its file name or class to WP Rocket's lazy load exclusions, or use the option to skip lazy loading for images above the fold if your version has it.

Divi section backgrounds are set in CSS, not as image tags. WP Rocket handles some background images through its own lazy load rules, so check that hero backgrounds still appear quickly.

The option to replace YouTube iframes with a preview image is safe with Divi's video module in most cases and saves a lot of loading time.

What about the Divi builder and static CSS files?

Divi's Static CSS File Generation stores page styles as files instead of inline code, which usually works well with WP Rocket because the files are cacheable.

You find it in Divi, then Theme Options, then Builder, then Advanced. Elegant Themes introduced it to cut down on inline CSS, as explained in its static CSS announcement.

If a layout looks outdated after an edit, clear Divi's static CSS files from the same screen, then clear WP Rocket's cache. Our guide on clearing WP Rocket cache shows each option.

WP Rocket does not cache pages while you are logged in by default, so the visual builder should not be affected.

How do you test your WP Rocket and Divi setup?

Change one setting at a time, clear both caches, then test key pages in a private window and with a speed tool such as PageSpeed Insights.

Check these areas after every change:

  • Header and mobile menu open and close
  • Sliders, tabs, toggles and accordions work
  • Animations play on scroll
  • Contact forms submit
  • WooCommerce cart and checkout work, if you use them
  • Layout looks right on phones and desktops

Use PageSpeed Insights to compare scores before and after. Look at real user data where available, not only the lab score.

If the site breaks and you cannot find the cause, our guide to fixing WP Rocket breaking your site explains how to roll back safely.

Is WP Rocket worth it on a Divi site?

WP Rocket is a strong match for Divi because it adds page caching and file optimization that Divi does not provide, while its compatibility rules reduce setup work.

Divi on its own still needs a caching layer. Your host may provide one, in which case WP Rocket's file optimization is the main gain.

If you want a broader setup plan, read our guide on configuring WP Rocket for Core Web Vitals.

For Divi-specific problems, see Divi not working in WordPress.

Frequently asked questions

Does WP Rocket work with Divi?

Yes. WP Rocket includes compatibility for Divi and documents it on its own help site. Most features work well together. Problems usually come from running overlapping options in both tools, such as critical CSS or jQuery deferral.

Should I turn off Divi Critical CSS when using WP Rocket?

If you use WP Rocket's Remove Unused CSS or Load CSS Asynchronously, it is usually best to choose one critical CSS approach rather than run both. Test each option on staging and keep the one that gives stable layouts and better scores.

Why is my Divi menu not working after enabling WP Rocket?

Delay JavaScript execution or script deferral is usually the cause. The menu script waits for user interaction or loads in the wrong order. Add exclusions for the related Divi scripts, or turn off Divi's own jQuery deferral.

Do I need to clear Divi's static CSS after changes?

Sometimes. If a layout shows old styles after editing, clear Divi's static CSS files in Theme Options, then clear WP Rocket's cache. This regenerates the files so visitors see the latest design.

Is Divi fast enough without a caching plugin?

Divi includes front-end performance options, but it does not provide page caching. Without a cache from your host or a plugin such as WP Rocket, every visit builds the page from scratch, which is slower.

Sources

  1. Using Divi with WP Rocket WP Rocket Docs
  2. Divi Dynamic CSS front-end performance feature Elegant Themes Help Center
  3. Divi Theme Options Elegant Themes Documentation
  4. Introducing static CSS file generation for Divi Elegant Themes
  5. PageSpeed Insights Google

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.