Version 4.10 of the Divi WordPress theme introduced an impressive raft of performance improvements. This includes the new dynamic module framework, dynamic CSS and dynamic JavaScript, which all makes sure only necessary code is loaded on each page. When combined with LiteSpeed web hosting, these performance improvements can cut website load times dramatically.

In the past I achieved a 93% improvement of website speed when I compared a UK based web host running Apache with a UK host running LiteSpeed with caching, but in this post I’m going to show you all the LiteSpeed Cache settings I use with Divi on WordPress.

Here are the load times of this website’s homepage in milliseconds, according to Pingdom:

All Divi performance improvements active but no caching

Divi performance improvements active + LiteSpeed cache enabled

That’s an 89% speed improvement between Divi on LiteSpeed with no caching and Divi on LiteSpeed with active caching.

So, here are the LiteSpeed Cache plugin settings I’ve found work well with Divi. It must be said that every website is unique so some of the settings below may break features you use, or you may be able to use some features I have turned off, so make sure you test things as you go.

General

General Settings tab

  • Automatically Upgrade: off
    Updating plugins risks introducing bugs so for most plugins it’s better to update manually then check the site. Updating also flushes the cache, temporarily slowing down the website, so it’s better to update all plugins and themes in one sitting rather than have them spread out, each one resetting the cache every time.
  • Domain Key: click the button to request a domain key
  • Guest mode: on
  • Guest Optimization: on
  • Server IP: set this to the IP your website is hosted at

Cache

Cache tab

  • Enable Cache: on
  • Cache Logged-in Users: on
  • Cache Commenters: on
  • Cache REST API: on
  • Cache Login Page: on
  • Cache favicon.ico: on
  • Cache PHP Resources: on
  • Cache Mobile: on
    You may not have unique content that’s only served to mobile devices but this feature is used for AMP, the CCSS and UCSS services and it’s required if you have Guest Mode + Guest Optimization enabled

Purge tab

  • Purge All On Upgrade: on
  • Auto Purge Rules For Publish/Update: tick all pages on which content will change when a new post or page is published, for e.g the homepage if it contains a feed of the latest blog posts.
  • Serve Stale: on

My host doesn’t allow automatically scheduled crawling in LiteSpeed so I don’t have scheduled purge turned on, but you can configure that here if you like.

 

Browser tab

  • Browser Cache: on
  • Browser Cache TTL: 2592000 (this is in seconds = 4 weeks and 2 days)

Advanced tab

  • Instant Click: on

Image Optimization

Image Optimization Settings

  • Auto Request Cron: on
  • Auto Pull Cron: on
  • Optimize Original Images: on
  • Remove Original Backups: off
  • Optimize Losslessly: on
  • Preserve EXIF/XMP data: off
  • Create WebP Versions: on
  • Image WebP Replacement: on
  • WebP For Extra srcset: on
    This helps catch every instance in which Divi uses images on a page
  • WordPress Image Quality Control: 82
    You can set it higher but it probably won’t make a visible difference.

After setting everything up in the Image Optimization Tab make sure you come back to the Image Optimization Summary tab to kick off the actual process. This will get WordPress to start sending your images to LiteSpeed’s servers for them to generate WebP versions that they’ll send back for your website to serve to users.

Page Optimization

CSS Settings tab

  • CSS Minify: on
  • CSS Combine: off
  • Generate UCSS and UCSS Inline: off
    They won’t be used when combine is off anyway
  • CSS Combine External and Inline: on
  • CSS HTTP/2 Push: on
  • Load CSS Asynchronously: on
  • CCSS Per URL: on
    This is important for theme builders like Divi
  • Inline CSS Async Lib: on
  • Font Display Optimization: swap

JS Settings tab

  • JS Minify: on
  • JS Combine: on
  • JS Combine External and Inline: off
  • JS HTTP/2 Push: on
  • Load JS Deferred: off

HTML Settings tab

  • HTML Minify: on
  • DNS Prefetch: //fonts.googleapis.com
  • DNS Prefetch Control: on
  • Remove Query Strings: off
  • Load Google Fonts Asynchronously: on
  • Remove Google Fonts: off
    Unless you’re not using Google Fonts, of course, in which case turn them off in Divi settings too
  • Remove WordPress Emoji: off
  • Remove Noscript Tags: off

Media Settings tab

  • Lazy Load Images: on
  • Responsive Placeholder: on
  • LQIP Cloud Generator: on
  • LQIP Quality: 6
  • LQIP Minimum Dimensions: 150 × 150
  • Generate LQIP In Background: on
  • Lazy Load Iframes: on
  • Add Missing Sizes: on
  • Inline Lazy Load Images Library: on

VPI tab

  • Viewport Images: on
  • Viewport Images Cron: on

Media Excludes tab

  • Lazy Load Image Excludes: add any recurring images to this field, e.g logo. Partial strings can be used, like ‘logo’ for all versions of a logo image instead of full file paths.

Database

Follow these instructions at your own risk. Carry out a full database backup first. You have been warned.

DB Optimization Settings tab

  • Revisions Max Number: 10
  • Revisions Max Age: 7

Manage tab

Click the following blocks to clear the corresponding bloaty elements from database:

  • Post Revisions
  • Expired Transients
  • Optimize Tables

Scroll down to the Database Table Engine Converter table and click the ‘Convert to InnoDB’ link for all db tables shown. Annoyingly the page will refresh after each click.

 

That’s it.

The first couple of times you load each page of your website it’ll be slower as the host will have to pull everything together. Once it’s done that it’ll start calculating critical CSS, combining scripts etc and saving cached copies of everything, whereafter things will speed up nicely.

Remember to back up before and test, test, test as you go.

You may also like…

Author: Aidan Ashby

Aidan is a web and branding designer living in Bristol, UK. He’s a cautious optimist and is loathe to discuss himself in the third person. He loves pancakes and has a perpetual desire to just be sat in the woods with his feet up in front of a bonfire.

Connect with Aidan on LinkedIn.

24 Comments

  1. Etienne

    Wow thank you so much Aidan!
    That really changed my website’s performances. Exactly what I was looking for. Great content !

    Does these settings mean there is no need to convert images to webp before uploading them to wordpress?

    Best wishes,

    Etienne

    Reply
    • Aidan

      Hey Etienne, glad to have helped.
      Yes that’s correct – in fact it’s better to upload in jpg so WordPress can dynamically show a jpg version to browsers that can’t handle WebP.

      Reply
  2. Aurelie

    Thank you so much Aidan, this really helped !
    As you said, for the first 24 hours, it was even worse, and then… wow ! I can’t believe the difference !

    Reply
    • Aidan

      Hey Aurelie, glad to have helped.

      Reply
  3. Daniel

    Great job, Aidan, works like a charm! I got a PageSpeed score of 90 on mobile, with your settings and a CDN for the images on a Divi site with WooCommerce.

    Reply
    • Aidan

      That’s great! Glad to help.

      Reply
  4. Neil

    Hi Aidan,

    Thank you very much for posting these settings. They work like a charm!

    Before, applying the settings with Divi’s Performance settings only, I was getting 51 for mobile. After installing LiteSpeed cache and applying your settings I’m now getting 92 mobile and 98 desktop with Google Page Speed Insights!

    Wow, amazing and brilliant 🙂

    You can view the site here: https://www.catsplumbing.com.au/

    Many thanks again.

    Kind regards,
    Neil.

    Reply
    • Aidan

      Excellent, glad to have helped.

      Reply
  5. Tony

    Hi

    I use Divi, LiteSpeed , Learndash.
    The problem i have is cache and learndash
    I have switch off cache logged in users as this appears to work with Learndash.
    But do you have any experience with Learndash/Litespeed combination ?

    Reply
    • Aidan

      I don’t, sorry. You could turn off caching of only certain pages that use variable Learndash data, just as I do with cart, checkout and account pages for WooCommerce.

      Reply
      • cpS

        Hi!
        Can you please tell me exactly what settings to disable in Divi Builder?
        Thanks

        Reply
        • Aidan

          In the performance options? On this website I have all options turned on, but what works for you really depends on the unique mix of plugins you’re using on your website. If you don’t know what won’t work just go for trial and error – turn everything on and thoroughly flush LiteSpeed and browser cache, see if everything still works. If it doesn’t then turn things off one after another, clearing cache between each until you find the problem, then turn everything else on but that setting.

          Or did you mean other settings? Which in particular?

          Reply
  6. Viet

    Hi Aidan,
    Does we need to disable all performance config on Divi before apply this ?

    Reply
    • Aidan

      No. I always disable Divi’s static CSS file generation in the Builder settings as it’s unnecessary doubling up of cache that doesn’t always clear properly when changes are made. But keep as many Divi performance options on as you can.

      Reply
  7. James

    wow thank you for this, I’m having issues with litespeed cache causing my Divi webforms submissions to fail. Do you think these settings would fix the issue? I know I should just try it myself, just asking on the off chance you have some up against this problem?

    Reply
    • Aidan

      You’ll just need to turn off a few javascript options at a time to narrow down the issue, each time fully flushing LiteSpeed’s JS/CSS cache, LiteSpeed’s page cache and your browser’s cace of the page (ctrl F5) to see which js optimisation settings cause it to fail.

      Reply
  8. ToTemat

    Hello, I have a question about LiteSpeed Cache. Whether there are positive differences in website speed – you need to use these third-party cloud and redis services in this plugin. And why, after installing this plugin, the database is many times larger. I have a small website on the lite speed server https://totemat.pl/ and I do not know why it is that when I run this plugin, the website works a bit slower – according to google page speed. What could be the reason?

    Reply
    • Aidan
      1. You don’t need to use external cloud services too, but every little helps. It just depends how complex your website is, how much traffic you’re serving and where visitors are coming from geographically (if you need a global reach then a CDN is a good idea).
      2. All caching plugins create static copies of pages when a visitor first visits a page. This 1. adds extra code that the server needs to parse and 2. adds to the database. However LiteSpeed allows you to optimise the database to a certain extent under LiteSpeed > Database in the admin menu. Clear expired transients and convert all database tables to a newer format.
      3. The first time a page is visited WordPress will generate it dynamically from the database and LiteSpeed Cache will pick up that code and save a cached version. Then in future visits of that page LiteSpeed will serve the cache and optimised version. Initial page loads are therefore not cached and may appear a bit slower. Additionally, as Divi now calculates critical CSS for optimisation of further page loads, together with LiteSpeed cache pages are only fully optimised by both Divi and LiteSpeed Cache after two page loads. Keep LiteSpeed Cache and the Divi performance options active for a couple of days then re test the page speed (e.g GT Metrix or Pingdom) and Google Pagespeed Insights scores.
      Reply
  9. Cristina

    Wow – thank you so much, your recommendations have made a huge difference! I am not technical and was hesitant to fiddle with LS settings, but I am so glad I did. First and largest contentful paint still need some tweaks but PageSpeed score is now 90-99. Thanks again for such a useful post!

    Reply
  10. Rey

    Mate, I’ve been struggling for literally months with Litespeed on Divi. My “URL list in UCSS queue waiting for cron” and “URL list in CCSS queue waiting for cron” is still piling up which is what I’ve been having problems with lately (might be cron issue), but so far I’m hitting 93 average on mobile and 99 on Desktop!

    You’re a legend!

    Reply
    • Aidan

      Thanks Rey!

      Reply
  11. Abu

    Thanks for this article. Currently, a few of the latest options are missing. It would be great if you update the blog based on recent updates on the plugin and theme to maximize the optimizations. Thanks again!

    Reply
  12. Hedia

    Thank you sooooo much! Litespeed was breaking my website, all is arranged 🙂

    Reply
  13. Flávio Halliday

    Hi Aidan,

    Flávio Halliday from Brazil. Your post it´s fantastic.

    Of course there are more thing today at LiteSpeed for setup

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Sign up to receive helpful free design tips in your inbox

Sign up to receive helpful free design tips in your inbox

Join our mailing list to receive the latest blog posts and updates from our team.

Includes a free download of our Good Nook font.

Thanks, you've been subscribed.