For WordPress websites, the LiteSpeed Cache plugin offers a robust solution for performance optimization, particularly when operating on a LiteSpeed server. This plugin’s extensive feature set can significantly enhance your site’s loading speeds, elevate the user experience, and even improve search engine optimization (SEO) rankings. However, its comprehensive capabilities also come with a considerable number of settings that can initially seem daunting.
This guide aims to demystify the LiteSpeed Cache plugin by detailing the optimal configuration for each section. We provide recommended settings based on established best practices for WordPress sites running on LiteSpeed servers, empowering you to unlock your site’s full potential. Let’s dive into how to effectively set up and fine-tune your LiteSpeed Cache.
Dashboard
The Dashboard serves as a central hub, offering a concise overview of your site’s performance and its integration with QUIC.cloud services. It consolidates information regarding your usage of image optimization, page optimization, CDN bandwidth, and Low Quality Image Placeholders (LQIP) features into one accessible location.
Here, you will find real-time indicators for various cache layers, observed improvements in page speed metrics, and the current status of critical services such as object caching and crawlers. This screen is primarily designed for informational purposes, helping you confirm that all optimization processes are running smoothly. Should you detect any issues or wish to explore a specific area in more detail, convenient links to relevant sections are readily available.
The Dashboard is an invaluable tool for maintaining control over your optimization strategy, providing a visual summary of resource usage, performance gains, and connectivity at a glance.
Presets
The Presets screen offers a streamlined approach to configuration, allowing you to apply a predefined set of settings or transfer existing configurations between different sites. This feature significantly accelerates the setup process, saving time and ensuring consistency.
[1] Standard Presets
You can select a preset that best aligns with your website’s requirements:
- Standard: This option is generally recommended for the majority of WordPress sites, offering a balanced approach to performance.
- Aggressive / High Performance: These presets are designed to deliver even greater speed improvements but typically necessitate thorough testing to ensure compatibility and stability.
It is advisable to begin with the “Standard” preset and only consider fine-tuning individual settings if further optimization is specifically required.
[2] Import/Export
The Import/Export functionality simplifies the process of reusing configurations across multiple websites:
- Import: This allows you to upload a previously saved configuration file, applying its settings to the current site.
- Export: Use this option to save your current LiteSpeed Cache settings into a file, which can then be used for backup or for importing into another site.
General Settings
The General settings section governs the plugin’s overall behavior and fundamental performance features, including Guest Mode and connectivity to online services. These settings act as the primary controls dictating how LiteSpeed Cache interacts with your server and applies frontend optimizations across your site.
[1] Online Services
This section confirms your website’s connection status to QUIC.cloud. Once successfully connected, advanced services such as image optimization, WebP/AVIF image generation, and LQIP features become available.
Connecting to QUIC.cloud is not mandatory but unlocks a suite of powerful cloud-based optimization features. If already integrated, manual domain key validation is typically not required.
[2] General Configuration
This segment encompasses the core configuration options that globally influence the LiteSpeed Cache plugin’s operation, particularly regarding first-time visitors and integration with cloud services.
- ON – Automatically Upgrade: Enabling this ensures that LiteSpeed Cache updates itself automatically upon the release of a new version. Disable it if you prefer to perform updates manually.
- ON – Guest Mode: This feature activates always-cacheable landing pages for new visitors, and adeptly manages advanced cache variations through AJAX. It proves highly beneficial for websites utilizing dynamic themes and catering to diverse devices.
- OFF – Guest Optimization: This setting enables advanced optimizations like Unique CSS (UCSS) and Critical CSS (CCSS) specifically for Guest Mode, leveraging QUIC.cloud services. Exercise caution when enabling this option, as it relies on external QUIC.cloud services, and improper configuration might lead to layout shifts or styling inconsistencies for first-time visitors.
- Server IP: Input your server’s IP address here to allow LiteSpeed services (such as CDN and optimization) to establish a direct connection without depending on DNS resolution. This practice helps to minimize lookup overhead.
- ON – Notifications: When enabled, this displays important news, hotfixes, beta releases, and promotional announcements directly within the plugin’s interface.
Guest Mode and Guest Optimization are designed to work in tandem to achieve maximum speed for initial visits. However, it is imperative to use caution when enabling both, as they can modify your .htaccess file, clear optimization queues, and potentially impact the behavior of specific themes or plugins.
⚠️ Note: Activating Guest Optimization has the potential to disrupt website layout or functionality in certain themes, especially those heavily reliant on dynamic CSS or JavaScript. It is crucial to conduct thorough testing before deploying this feature in a production environment.
[3] Tuning
The Tuning section provides granular control over Guest Mode’s behavior for specific visitors. You have the flexibility to exclude certain user agents (like bots or crawlers) or cookies from Guest Mode, or even from the cache entirely. This is particularly useful for preventing conflicts with A/B testing tools, analytics scripts, or logged-in user experiences that depend on dynamic content.
Appropriate tuning ensures that Guest Mode maintains its performance benefits while simultaneously avoiding caching issues with incompatible services or visitors who should bypass cached versions of your site.
Utilize this section to meticulously fine-tune exceptions for Guest Mode, guaranteeing stable and predictable behavior across all user types without resorting to disabling global optimization.
Cache Management
This section allows you to precisely control which content is cached and how the cache operates under various conditions. It covers configurations for exclusions, cache duration (Time To Live), triggers for cache purging, and advanced logic such as Edge Side Includes (ESI) and object caching.
[1] Cache Settings
This segment defines which types of requests and user interactions are eligible for caching. Activating the appropriate options here can lead to substantial performance improvements by reducing server load and accelerating page delivery.
- ON – Enable Cache: This is the primary toggle for activating LiteSpeed Cache on your website.
- OFF – Cache Logged-in Users: Disabled by default to prevent the serving of static cached content to users who have dynamic or personalized dashboards. Enable this option only after conducting comprehensive testing on membership or intranet-style websites where such behavior is desired and verified.
- ON – Cache Commenters: Caches pages specifically for users who have submitted comments but are not currently logged in. This can enhance performance on content that generates significant discussion.
- ON – Cache REST API: Caches WordPress REST API requests, thereby improving response speed, which is especially beneficial for headless WordPress installations or themes heavily reliant on AJAX.
- ON – Cache Login Page: Improves the performance of login pages, though it may require testing with security plugins to ensure full compatibility.
- ON – Cache PHP Resources: Caches pages generated by PHP includes, which is valuable for themes and plugins that deliver dynamic content through PHP. Note: This option was removed in LiteSpeed Cache version 7.2.
- OFF – Cache Mobile: Disabled by default. Enable this setting only if your theme or website serves distinct layouts or content tailored specifically for mobile users. Activating this option will modify your
.htaccessfile and reset the crawler list.
Activate only the cache options that are pertinent to your specific setup. Features like mobile cache and PHP resources caching can significantly boost performance, but careful testing is essential if your theme is highly dynamic.
[2] TTL (Time To Live)
TTL settings dictate the duration for which specific content types remain in the cache before they expire and are subsequently regenerated. Adjusting these values helps to strike a balance between optimal performance and content freshness, depending on how frequently your content is updated.
- Default Public Cache TTL: Set to
604800seconds (equivalent to 1 week). This applies to pages accessible by all users. - Default Private Cache TTL: Set to
1800seconds (equivalent to 30 minutes). This is for personalized content, such as views for logged-in users. - Default Front Page TTL: Set to
604800seconds (equivalent to 1 week). This controls the refresh rate for your website’s homepage. - Default Feed TTL: Set to
604800seconds (equivalent to 1 week). This is used for RSS/Atom feeds. Setting this value below 30 seconds will disable caching for feeds. - Default REST TTL: Set to
604800seconds (equivalent to 1 week). This applies to responses from the REST API. - Default HTTP Status Code Page TTL: Allows you to set custom TTLs for pages returning specific HTTP status codes. For example:
403 3600: Caches “Forbidden” pages for 1 hour.404 3600: Caches “Not Found” pages for 1 hour.500 3600: Caches “Server Error” pages for 1 hour.
Longer TTL values generally lead to improved performance, but they carry the risk of serving stale content. For pages that are frequently updated, shorter TTLs ensure that users see the most current version sooner.
[3] Purge Settings
The Purge settings determine when cached content should be automatically cleared and regenerated. Thoughtful configuration in this area is crucial for ensuring visitors consistently receive fresh, up-to-date content without requiring manual intervention, especially after significant site changes.
- ON – Purge All On Upgrade: This setting automatically clears the entire cache whenever a plugin, theme, or the WordPress core is updated.
- Auto Purge Rules For Publish/Update: This allows you to select which types of pages should be purged from the cache when a post or page is created or updated. Recommended options typically include:
- Front page and Home page
- Pages and Post type archive
- Term archive (categories, tags, taxonomies)
- OFF – Serve Stale: Disabled by default to prevent the delivery of outdated content. You might consider enabling this option if your site frequently experiences traffic spikes or has prolonged cache regeneration times, as it can help maintain speed while new cache versions are being built.
- Scheduled Purge URLs: Here, you can add specific URLs (one per line) that need to be purged at regular, predetermined intervals.
It is important to configure purging rules judiciously. Over-purging can inadvertently reduce performance by forcing frequent cache regenerations, while under-purging may lead to users seeing outdated content. The “Serve Stale” option provides an effective middle ground by maintaining site speed during the cache regeneration process.
[4] Exclusions
The Excludes tab empowers you to define specific content types or request patterns that should bypass caching altogether. This functionality is vital for ensuring that dynamic pages, user-specific views, or third-party tools function correctly without any interference from cached responses.
- Do Not Cache URIs: Add specific page paths here, such as
/checkout/,/cart/, or custom dashboard pages that inherently require dynamic, real-time updates. - Do Not Cache Query Strings: Exclude particular query parameters (e.g.,
utm_,ref=) to prevent cache conflicts in marketing campaigns or tracking implementations. - Do Not Cache Categories / Tags: Input category or tag slugs to exclude specific taxonomy archive pages from being cached. This is particularly useful if these pages feature dynamic widgets or content.
- Do Not Cache User Agents: Specify bots, tools, or particular browsers that should bypass the cache. Each entry should be placed on a new line.
- Do Not Cache Roles: Select specific user roles (e.g., Administrator, SEO Editor) that should always bypass the cache to view real-time content updates or work with draft elements.
Excluding certain pages and user roles from caching is a critical step for ensuring accurate and expected behavior in areas such as e-commerce carts, logged-in user dashboards, or SEO testing environments.
[5] ESI (Edge Side Includes)
ESI provides a sophisticated level of caching control by treating distinct parts of a web page as separate cache blocks. This is exceptionally beneficial for managing elements like logged-in user experiences, e-commerce carts, comment forms, or administrative bars, which must remain dynamic while the remainder of the page can be served from the cache.
- OFF – Enable ESI: This is disabled by default. Activate it only if your website specifically requires partial caching of dynamic content, such as WooCommerce carts or user-specific widgets. Enabling ESI often necessitates additional configuration and can introduce a degree of complexity.
- ON – Cache Admin Bar: This setting caches the WordPress admin toolbar block independently using ESI.
- ON – Cache Comment Form: Enables ESI for comment forms, allowing them to remain interactive without requiring the entire page cache to be disabled.
- ESI Nonces: Add WordPress nonces here that should be excluded from the full-page cache and instead be served dynamically. This is useful for plugins or forms that rely on secure, time-sensitive tokens for functionality.
- Vary Group: Assign specific user roles (such as Administrator) a custom Vary Group ID if you intend to serve different cached versions of a page to distinct user roles.
While ESI is a powerful feature, it should be utilized with caution. It is imperative to conduct thorough testing when enabling ESI to ensure full compatibility with dynamic plugins or role-based content delivery.
[6] Object Cache
The Object Cache screen facilitates server-side caching of frequently executed database queries using in-memory data stores like Memcached or Redis. This significantly alleviates database load and enhances overall performance, particularly for dynamic or high-traffic websites.
- OFF – Object Cache: This is disabled by default. Only enable if your server environment supports Redis or Memcached and you have verified its proper configuration. When correctly implemented, object caching can dramatically improve performance on dynamic or database-intensive websites.
- Method: Choose between
MemcachedandRedis. Both are highly effective; select the option that is supported and recommended by your hosting provider. - Host & Port: Configure the connection details for your chosen object cache. Typically, these are
127.0.0.1and11211for Memcached, or6379for Redis. - Default Object Lifetime: Set the Time To Live (TTL) for cached database objects, for example,
3600seconds (1 hour). - Global Groups: These are WordPress object groups that are shared across a network and should always be cached for optimal performance.
- Do Not Cache Groups: Specify groups, such as sessions or comments, that should be explicitly excluded from object caching.
- ON – Persistent Connection: Enables long-lived connections to the object cache service, which generally leads to improved performance.
- OFF – Cache WP-Admin: It is generally recommended to disable caching for the WordPress administration area, as caching can sometimes display outdated data. This is particularly important in dynamic environments where posts, plugins, orders, or settings are frequently updated.
- ON – Store Transients: This setting stores WordPress transients (temporary cached data) in memory, thereby accelerating their retrieval time.
Object caching offers substantial benefits, especially for websites with a high volume of logged-in users or those running database-intensive plugins. It is always a good practice to test both Memcached and Redis to determine which performs optimally for your specific server setup.
[7] Browser Cache
This section governs how static files—such as images, JavaScript, and CSS—are cached within the user’s web browser. Enabling browser caching reduces the need for repeated requests to the server and significantly improves load times for returning visitors by storing these resources locally on their device.
- ON – Browser Cache: Activating this option enables browser-level caching for static assets. This setting modifies the
.htaccessfile to apply appropriate cache-control headers, instructing browsers on how long to store these resources. - Browser Cache TTL: Set to
31557600seconds (equivalent to 1 year). This value is considered optimal for the long-term caching of versioned files, ensuring that browsers do not constantly re-download assets that have not changed.
Browser caching is a fundamental aspect of website performance optimization. It is crucial to ensure that versioned file names (e.g., style.css?v=2.0) are used for static assets to prevent outdated files from being served when updates are deployed.
[8] Advanced Cache Settings
The Advanced settings section is designed for experienced users who require highly customized cache behavior for specific scenarios, such as AJAX requests, login cookies, or cross-protocol compatibility.
These options should be used with considerable caution, as incorrect configuration can compromise caching accuracy or lead to an undesirable increase in server load.
- AJAX Cache TTL: This allows you to cache specific AJAX POST/GET actions. You can define the action and its Time To Live (TTL) in seconds, one per line.
- Login Cookie: This is a custom login cookie identifier. It is necessary when running multiple web applications on the same domain to prevent conflicts in login detection. The default value is
_lscache_vary. - Vary Cookies: This option enables you to add additional cookies to distinguish between different cache variations (e.g., for A/B testing implementations or multilingual website setups).
- OFF – Improve HTTP/HTTPS Compatibility: This setting is disabled by default. Only enable it if your website serves content over both HTTP and HTTPS URLs, which is an uncommon scenario in modern web development. Most contemporary websites should be entirely served via HTTPS, rendering this setting unnecessary.
- ON – Instant Click: This feature preloads page content when a user hovers over a link, which significantly enhances the perceived speed of navigation. It is important to note that this may result in a slight increase in server load.
Only adjust advanced options when you possess a complete understanding of their potential impact. Misuse of these settings can lead to inconsistent cache behavior across different users and browsing sessions.
CDN Integration
Integrating with a Content Delivery Network (CDN) can profoundly improve your website’s global reach and dramatically reduce loading times. This section provides the necessary configurations to set up CDN services, ensuring your static assets are delivered from servers geographically closer to your visitors.
[1] QUIC.cloud CDN
QUIC.cloud is a CDN solution developed by LiteSpeed, specifically engineered to enhance WordPress performance. It improves the global Time To First Byte (TTFB) by caching both dynamic and static assets across a distributed network of edge locations. Furthermore, it is a prerequisite for utilizing certain LiteSpeed Cloud features, including image optimization and critical CSS generation.
- OFF – Enable QUIC.cloud CDN only after you have properly configured your DNS. This can be achieved through LiteSpeed DNS, Cloudflare in proxy mode, or other supported integration methods.
QUIC.cloud offers substantial performance benefits for both dynamic and static caching. Only enable it when you are prepared to manage the necessary DNS changes or if you are already utilizing a supported CDN integration.
[2] Cloudflare Integration
LiteSpeed Cache offers seamless integration with Cloudflare’s API, enabling automatic cache purging and synchronization of basic settings such as development mode, minification, and more.
- OFF – Enable this option only if you desire LiteSpeed Cache to directly manage your Cloudflare settings from within your WordPress dashboard.
- Cloudflare API Token: Provide your Cloudflare API token only when this integration is enabled and has been thoroughly tested for proper functionality.
This integration is optional. While it provides centralized control, it is not essential if you prefer to manage Cloudflare settings manually or directly through their own dashboard.
[3] Other Static CDNs
If you are utilizing a third-party CDN provider such as Bunny.net, KeyCDN, or CloudFront, this section allows you to enable CDN mapping and control how static assets are replaced across your website.
- ON – Use CDN Mapping: This setting replaces your website’s static asset URLs with your designated CDN endpoint URL.
- CDN URL: Enter the complete URL of your CDN (e.g.,
https://cdn.yoursite.com). - HTML Attribute To Replace: Define which HTML attributes (e.g.,
srcorhref) should have their URLs rewritten to point to the CDN. - Original URLs: Your website’s domain(s) that should be targeted for replacement (these are typically auto-filled by default).
- Included Directories: Commonly set to
wp-contentandwp-includes, this limits CDN usage specifically to static assets located within these directories. - Exclude Path: Use this field to prevent specific files or folders from being served via the CDN.
CDN mapping is highly effective in improving the delivery speed of static assets. After enabling, always verify the functionality of critical features (such as fonts or third-party scripts) to ensure they operate as expected.
Image Optimization
This section is dedicated to optimizing image delivery through various techniques, including compression, lazy loading, and conversion to modern formats like WebP. The majority of these optimization processes are handled via QUIC.cloud, thereby minimizing the processing load on your own server.
[1] Image Optimization Summary
This page provides a clear overview of your image optimization status, showing how many images are pending, have been optimized successfully, or have failed to optimize. It also allows you to manually initiate optimization tasks. This summary is invaluable for tracking progress and re-optimizing images as needed.
- Status Table: Displays the count of optimized, failed, or pending images.
- Resend Optimization Request: Use this option to re-queue images that may have gotten stuck during the optimization process.
[2] Image Optimization Settings
This section governs how images are optimized and subsequently delivered, encompassing automation, compression types, modern formats like WebP/AVIF, and fallback attributes. Proper configuration here ensures faster loading times without compromising visual quality.
- ON – Auto Request Cron: Automatically initiates new image optimization tasks in the background using a cron job, eliminating the need for manual triggers.
- ON – Optimize Original Images: Reduces the file sizes of your original image uploads, which also helps to conserve server storage space.
- OFF – Remove Original Backups: This option permanently deletes the pre-optimized (original) image files. It is generally not recommended unless server storage is extremely limited, as it prevents reverting to original images.
- ON – Optimize Losslessly: Utilizes a lossless compression algorithm to preserve the full quality of your images. While this method retains superior visual fidelity, it may result in slightly larger file sizes compared to lossy compression.
- OFF – Preserve EXIF/XMP Data: Only enable this if retaining metadata (such as camera information, date, or copyright) is essential, for example, for professional photographers.
- Next-Gen Image Format: Choose between
WebPandAVIFfor modern image delivery. AVIF generally offers superior compression efficiency but may not be supported on all older devices or browsers. - WebP/AVIF Attribute to Replace: Customize which HTML attributes will be replaced with the optimized image versions (e.g.,
img.src,div.data-src). - OFF – WebP/AVIF for Extra Srcset: Enable this only if you are serving images via custom
srcsetattributes that fall outside of standard WordPress image logic.
Optimized images are crucial for accelerating your website and reducing server bandwidth consumption. Exercise caution with irreversible options, such as removing backups, and thoroughly test WebP/AVIF compatibility across various browsers and devices before deploying.
Page Optimization
These settings dictate how your site manages HTML, CSS, and JavaScript delivery, which profoundly impacts load times and crucial Core Web Vitals. Meticulous tuning in this area can effectively eliminate render-blocking resources and significantly improve First Contentful Paint (FCP) and Largest Contentful Paint (LCP) scores.
[1] CSS Settings
This section addresses the optimization of your CSS files to achieve better performance and faster page rendering. It includes options for minification, combining, asynchronous loading, Unique CSS (UCSS) generation, and font rendering behavior.
- ON – CSS Minify: Removes unnecessary characters, spaces, and comments from CSS files to reduce their overall size.
- OFF – CSS Combine: Generally not recommended when using HTTP/2, as modern browsers can efficiently handle multiple parallel requests. Combining files can sometimes introduce compatibility issues.
- ON – Generate UCSS: Utilizes QUIC.cloud to generate and deliver only the essential (unused) CSS per page. Note: This feature is bypassed if CSS Combine is turned off.
- ON – UCSS Inline: Inlines the unique CSS generated by QUIC.cloud directly into the HTML for enhanced performance and reduced render-blocking.
- ON – CSS Combine External and Inline: When enabled, this also includes inline styles in the combined CSS file, further consolidating styles.
- OFF – Load CSS Asynchronously: Disabled by default. While this setting can improve perceived performance, it may lead to visual layout issues (Flash of Unstyled Content - FOUC) if not properly configured. Enable only after thorough testing and a clear understanding of its interaction with UCSS and critical CSS.
Use this option with care; incorrect implementation can result in flashes of unstyled content (FOUC) or broken page layouts.
- OFF – CCSS Per URL: Use only if you require Critical CSS to be generated uniquely for each post or page. While this can save quota usage, it might cause styling inconsistencies on dynamic layouts.
- ON – Inline CSS Async Lib: Inlines the asynchronous CSS loader to ensure that styles load correctly, even if there are delays in JavaScript execution.
- Font Display Optimization: Set to
Swap. This allows text to display using a fallback font before webfonts have fully loaded, which significantly improves perceived load speed.
CSS optimizations, such as asynchronous loading and UCSS, can dramatically enhance performance, especially for mobile visitors. Always conduct thorough testing when activating these options to prevent any visual regressions or unintended display issues.
[2] JS Settings
This section focuses on optimizing JavaScript to improve page load times and mitigate render-blocking behavior. Available options include minification, combining script files, and deferring JavaScript execution.
- ON – JS Minify: Removes extraneous characters from JavaScript files to reduce their overall size.
- OFF – JS Combine: Not strictly necessary with HTTP/2, which efficiently manages multiple parallel requests. Combining scripts can introduce compatibility issues and is generally discouraged unless specifically required for legacy setups or particular configurations.
- OFF – JS Combine External and Inline: Disabled by default because JS Combine is also off. You can enable this setting only after activating JS Combine and confirming that it does not cause any conflicts. This feature is useful for consolidating global JavaScript files and inline scripts.
- Deferred – Load JS Deferred: This option loads scripts after the HTML document has been fully parsed, which significantly improves performance and Core Web Vitals such as First Input Delay (FID). Choose “Delayed” if you want scripts to wait until a user interaction occurs.
JavaScript optimization can greatly enhance perceived performance, but improper implementation may lead to layout problems or script errors. Always conduct comprehensive testing after enabling Combine and Defer options to ensure full functionality.
[3] HTML Settings
This section provides advanced options to reduce the size of the HTML output, improve DNS resolution, and strip unnecessary elements such as emojis, Google Fonts, or noscript tags. These optimizations collectively contribute to faster page rendering and reduced bandwidth consumption.
- ON – HTML Minify: Strips out superfluous spaces, comments, and other non-essential characters from the HTML output to minimize page size.
- DNS Prefetch: Allows you to manually specify external domains for pre-resolution, which can improve load times for third-party resources by initiating DNS lookups earlier.
- OFF – DNS Prefetch Control: Disabled because automatic prefetching can sometimes introduce unnecessary DNS lookups and increase page complexity. It is generally more efficient to manually define only the essential domains that require prefetching using the dedicated DNS Prefetch setting.
- DNS Preconnect: Instructs the browser to initiate early connections to specified origins, leading to faster fetching of critical resources from external sources.
- HTML Lazy Load Selectors: Enables lazy loading for custom HTML elements that are off-screen, identified by CSS selectors. This is useful for deferring the loading of non-critical content.
- HTML Keep Comments: Allows you to retain specific HTML comments during minification by matching their text content. This can be helpful for preserving dynamic placeholders or instructional notes.
- ON – Remove Query Strings: Removes version numbers and query strings from static resource URLs (e.g.,
style.css?ver=1.0) to improve caching efficiency and ensure browsers cache files more effectively. - OFF – Load Google Fonts Asynchronously: Disabled because loading fonts asynchronously can still introduce delays in rendering and cause layout shifts. It is often recommended to self-host fonts or consider removing Google Fonts entirely for superior performance and enhanced privacy.
- ON – Remove Google Fonts: Completely disables the loading of Google Fonts from your web pages.
- ON – Remove WordPress Emoji: Prevents the loading of the default WordPress emoji script. Browser-native emojis will still display correctly.
- ON – Remove Noscript Tags: Removes all
<noscript>tags from the HTML output, which contributes to reducing the Document Object Model (DOM) size.
While many of these settings offer significant performance advantages, it is crucial to thoroughly test critical design elements, such as fonts and third-party tools, after applying them to ensure full compatibility and expected behavior.
[4] Media Settings
This section controls various aspects of media handling, including lazy loading behavior, image placeholders, LQIP (Low Quality Image Placeholder) generation, and WordPress image compression. Proper configuration here can lead to reduced load times and improved Core Web Vitals scores.
- ON – Lazy Load Images: This setting delays the loading of images until they enter the user’s viewport, thereby reducing the number of initial requests and accelerating page rendering.
- Basic Image Placeholder: A default base64 encoded image used as a temporary placeholder before the actual image loads. This can be customized by editing your
wp-config.phpfile. - ON – Responsive Placeholder: This feature helps maintain a stable page layout by preserving image dimensions during the loading process, which prevents disruptive layout shifts.
- Responsive Placeholder SVG: Allows for a custom SVG to be used as a responsive placeholder, which is converted to base64 on the fly for efficient delivery.
- Responsive Placeholder Color: The hexadecimal color code used to fill the SVG placeholder. The default value is
#cfc4db. - ON – LQIP Cloud Generator: Leverages QUIC.cloud services to create Low Quality Image Placeholders, significantly enhancing the perceived load time for users.
- LQIP Quality: Currently set to 4. Higher values will result in better quality LQIPs but will also increase their file size and impact your usage quota.
- LQIP Minimum Dimensions: Set to 150x150 pixels. Images smaller than these dimensions will not have LQIPs generated for them.
- ON – Generate LQIP in Background: Handles the generation of LQIPs asynchronously using a cron job, which improves the performance of your WordPress admin area.
- ON – Lazy Load Iframes: This delays the loading of iframes until they become visible within the user’s viewport, similar to image lazy loading.
- ON – Add Missing Sizes: Automatically adds width and height attributes to image tags. This is crucial for preventing layout shifts and improving Cumulative Layout Shift (CLS) scores, and requires lazy loading to be enabled.
- WordPress Image Quality Control: It is generally advisable to leave this at its default setting. This controls the compression level applied to images during WordPress image generation (the default is 82).
To optimize visual performance and achieve better Core Web Vitals scores, it is highly recommended to enable lazy loading, utilize responsive placeholders, and activate background LQIP generation.
[5] Viewport Images (VPI)
This setting refines lazy loading by automatically identifying images that appear above the fold (within the initial viewport) and excluding them from lazy load. This ensures that the most critical visual content renders quickly, improving the initial user experience.
- ON – Viewport Images: Automatically excludes images that are immediately visible in the user’s viewport from lazy loading, thereby improving the first paint and LCP (Largest Contentful Paint).
- ON – Viewport Images Cron: Automates the generation of VPIs using a background cron job, ensuring consistent optimization.
This feature significantly enhances user-perceived performance by ensuring that essential images load instantly. This is especially beneficial for mobile users and contributes positively to Core Web Vitals.
[6] Media Exclusions
This section allows you to prevent specific images, iframes, or URLs from being lazy loaded or undergoing optimization. This is particularly useful for avoiding layout shifts or conflicts with key visual elements that require immediate and full rendering.
- Lazy Load Image Excludes: Leave this field blank, or specify exact image URLs or patterns to prevent specific images from being lazy loaded.
- Lazy Load Image Class Name Excludes: Input class names such as
wmu-preview-imgorno-lazyto disable lazy loading for any image bearing these classes. - Lazy Load Image Parent Class Name Excludes: (Empty by default) This can be used to exclude all images contained within a specific parent HTML container element from lazy loading.
- Lazy Load Iframe Class Name Excludes: (Empty by default) Define specific iframe class names to skip their lazy loading.
- Lazy Load Iframe Parent Class Name Excludes: (Empty by default) Skip iframe lazy loading based on the class names of their parent container elements.
- Lazy Load URI Excludes: (Empty by default) Allows you to bypass lazy loading on specific pages or post types by defining matching URI patterns.
- LQIP Excludes: Prevents the generation of low-quality image placeholders for specific images.
Use exclusions judiciously and only for elements that absolutely require immediate full loading, or where lazy loading introduces visual or functional problems.
[7] Localization
This section is designed to cache Gravatar images locally and to localize external JavaScript resources. These actions help to reduce external HTTP requests, thereby speeding up overall page loading times.
- ON – Gravatar Cache: This setting stores avatar images locally on your server, which significantly reduces the load time for Gravatar images.
- ON – Gravatar Cache Cron: Automatically refreshes cached Gravatar images in the background to ensure they remain up-to-date.
- Gravatar Cache TTL: Set to
604800seconds (equivalent to 1 week). This defines the duration for which Gravatar images are cached. - OFF – Localize Resources: Disabled by default. Serving external scripts locally (such as those for Google Analytics or reCAPTCHA) can potentially lead to functionality issues, outdated script versions, or compliance concerns. Use this option with extreme caution and only if you fully comprehend its implications for your website.
- Localization Files: This field typically includes external URLs that could potentially be localized, such as:
https://www.google.com/recaptcha/api.jshttps://www.google-analytics.com/analytics.jshttps://www.googletagmanager.com/gtag/jshttps://www.googletagmanager.com/gtm.jshttps://www.googletagservices.com/tag/js/gpt.js
While localizing third-party scripts can reduce external calls, it must be tested meticulously to avoid disrupting analytics tracking or other essential functionalities.
[8] Tuning Settings (JS/CSS)
These advanced options provide granular control to fine-tune the behavior of JavaScript and CSS optimization. They are particularly valuable for resolving compatibility issues or precisely targeting performance optimizations to specific user groups.
- JS Delayed Includes: Add specific JavaScript files or patterns here that should be delayed (i.e., loaded only after user interaction) to prioritize initial page rendering.
- JS Excludes: Prevent specific JavaScript files from being minified or combined if they are known to cause layout or functionality issues.
- JS Deferred/Delayed Excludes: Exclude critical JavaScript files from being deferred or delayed to prevent frontend errors and ensure essential scripts execute immediately.
- Guest Mode JS Excludes: JavaScript files listed here will not be optimized when Guest Mode is active, which is useful for dynamic scripts that rely on their original execution context.
- URI Excludes: Prevent optimization from being applied on specific page paths (e.g., checkout, login, or dashboard pages) where dynamic content is paramount.
- ON – Optimize for Guests Only: Restricts CSS/JS optimization solely to guest visitors, providing a balanced approach to safety and performance.
- Role Excludes: Allows you to exclude specific WordPress user roles (e.g., Editor, Administrator) from receiving certain optimizations, enabling them to always view the most current content.
Utilize the Tuning panel to proactively prevent conflicts on sensitive pages or with crucial scripts. This is especially helpful when dealing with third-party integrations or features tied to specific user roles.
[9] Tuning – CSS
This section offers precise control over CSS optimization, with a particular focus on Critical and Unused CSS (CCSS/UCSS). These settings are invaluable for resolving display issues, preventing layout shifts, or gracefully handling dynamic content.
- CSS Excludes: Prevent specific stylesheets from being minified, combined, or loaded asynchronously if they cause rendering problems.
- UCSS File Excludes and Inline: Prevent certain stylesheets from being processed by the Unused CSS removal feature, and optionally force them to be inlined into the HTML.
- UCSS Selector Allowlist: Ensure that specific CSS selectors are never removed, even if they are detected as unused (e.g., animation classes or classes injected by JavaScript).
- UCSS URI Excludes: Skip UCSS optimization for specified page URLs. This is particularly useful for highly dynamic or interactive layouts where UCSS might interfere.
- Separate CCSS Cache Post Types: Generate a separate Critical CSS file for each post type. This is recommended when layouts differ significantly across different content types.
- Separate CCSS Cache URIs: Generate Critical CSS specifically for individual pages (URIs). This improves rendering accuracy at the expense of additional processing and storage.
- CCSS Selector Allowlist: Keep essential selectors in all Critical CSS files to prevent visual flickers or layout inconsistencies, especially for site-wide elements.
- Critical CSS Rules: Define specific CSS rules that should always be injected into the critical path of page rendering. This is useful for ensuring immediate styling of crucial elements like headers or navigation menus.
Fine-tuning Critical and Unused CSS is key to balancing speed with visual integrity. Exercise caution when excluding or forcing styles, and thoroughly test changes across various templates and devices.
Database Optimization
A clean and optimized database is fundamental to improving query speed and overall website performance. This section guides you through setting up automatic database maintenance to keep your WordPress installation running efficiently and smoothly.
[1] Database Management
This section provides tools to clean up unnecessary or outdated database entries, which helps to reduce database overhead and enhance performance. You can manually delete various types of redundant data, streamlining your database without impacting active content.
- Clean All: Executes a comprehensive cleanup operation across all predefined categories, including revisions, drafts, spam comments, and more.
- Post Revisions: Deletes older post revisions, typically retaining only the last few (e.g., 4) and those newer than a specified age (e.g., 120 days).
- Orphaned Post Meta: Removes leftover meta entries that no longer correspond to active posts.
- Auto Drafts: Clears automatically saved drafts that are no longer in active use.
- Trashed Posts & Comments: Cleans up content that has been moved to the trash and is awaiting permanent deletion.
- Spam Comments: Removes comments that have been automatically marked as spam by moderation tools.
- Trackbacks/Pingbacks: Deletes unused or outdated trackbacks and pingbacks.
- Expired Transients: Clears temporary options used by plugins and themes that have passed their expiration date.
- All Transients: Removes all transients, which is useful if expired values were not properly cleared.
- Optimize Tables: Executes a MySQL table optimization command to reclaim unused space within database tables and improve query speed.
Regular database cleanups can significantly improve backend performance and reduce disk usage, particularly for websites with frequent content updates or high comment activity.
[2] DB Optimization Settings
These settings control how post revisions are retained during database cleanup operations. This helps to reduce unnecessary database bloat while still preserving recent changes for safety and recovery purposes.
- Revisions Max Number: Set to
4– this keeps only the last 4 revisions for each post before older ones are deleted. - Revisions Max Age: Set to
120days – revisions newer than 120 days will be preserved, ensuring recent edits are not lost.
Limiting both the number and age of revisions is an effective strategy for maintaining a lean and efficient database without losing access to recent content edits.
Crawler Configuration
The LiteSpeed Cache crawler is designed to pre-warm your cache by automatically visiting pages in the background. This proactive approach ensures that your visitors consistently receive the fastest cached version of your site, even immediately after content updates or cache purges.
[1] Summary
The crawler status and statistics provide valuable insights into which URLs were successfully scanned, skipped, or encountered failures. This data is essential for identifying any gaps in your cache coverage and optimizing the crawler’s efficiency.
[2] Map
This displays the sitemap or internal link structure that the crawler utilizes. You have the flexibility to customize or upload your own sitemap to precisely control which URLs the crawler includes in its pre-caching process.
[3] Blocklist
The Blocklist feature allows you to prevent specific URIs, query strings, or patterns from being crawled. This is particularly useful for excluding high-CPU usage pages or dynamic content that should not be cached.
[4] Settings
This section governs the behavior of the LiteSpeed Cache Crawler, ensuring that cached content remains fresh and readily available for visitors by simulating traffic based on your sitemap.
- ON – Crawler: Enables the cron-based pre-caching of your site’s content.
- Crawl Interval: Set to
302400seconds (approximately 3.5 days) between full sitemap crawls. This determines how frequently the crawler will re-scan your entire site. - Custom Sitemap: It is crucial to add your sitemap URL here (e.g.,
https://yourdomain.com/sitemap_index.xml) to explicitly define the source of URLs that the crawler will pre-cache. - Server Load Limit: The default is set to 1. You can increase this limit according to your server’s available resources and strength. This prevents the crawler from overloading your server during its operations.
- Role Simulation: (Empty by default) Only guest crawling is used unless ESI is enabled and specific roles are defined for simulation.
- Cookie Simulation: (Not configured by default) This option allows for simulating visitors based on specific cookie values if such nuanced caching is required.
The crawler is instrumental in ensuring that critical pages remain warm in the cache, thereby improving TTFB (Time To First Byte) and overall performance for first-time visits. It is important to monitor server load to avoid excessive resource consumption during crawling.
Toolbox
The Toolbox provides convenient and quick access to essential maintenance functions, including cache purging, .htaccess file editing, critical CSS resets, and domain key management. This section is designed to simplify troubleshooting, testing, and resetting LiteSpeed settings without the need to navigate through the extensive full settings panels.
This section is invaluable for efficiently troubleshooting, testing, and resetting LiteSpeed Cache settings, streamlining your workflow without having to delve into every detailed configuration panel.
Summary: Optimal LiteSpeed Cache Configuration for Peak Performance
Having explored every section of the LiteSpeed Cache plugin, we can now consolidate the most impactful takeaways and best practices. Implementing these recommendations will ensure your WordPress site achieves and maintains peak performance, delivering an exceptional user experience.
LiteSpeed Cache transcends the capabilities of a mere page caching plugin; it is a comprehensive, full-stack optimization system that influences every aspect of your site, from server response times to frontend rendering. When meticulously configured, it can dramatically reduce load times, significantly boost Core Web Vitals scores, and enhance the experience for both human users and search engines alike.
- Begin with a Preset: Start with the “Standard” preset as a solid foundation, and then meticulously customize the settings to meet the unique demands of your specific website.
- Strategic Caching: Cache all public-facing content, but always exercise caution by excluding dynamic pages such as login pages, shopping carts, checkout processes, and user dashboards to prevent data inconsistencies.
- Leverage Guest Mode + Optimization: Activate both Guest Mode and Guest Optimization to achieve substantial performance benefits for first-time, anonymous visitors, ensuring a swift initial load.
- Utilize QUIC.cloud CDN: Take advantage of its seamless integration, dynamic CDN support, and its essential role in enabling Guest Optimization and Critical CSS generation for superior global performance.
- Prioritize Image Optimization: Implement WebP/AVIF formats and lazy loading, and ensure that image optimization runs automatically in the background to keep your visual content lean and fast.
- Fine-Tune Page Optimization: Systematically minify, combine, and defer JavaScript and CSS files. However, always conduct thorough testing with your specific theme and plugins to prevent any conflicts or breakage.
- Schedule Regular Database Cleanups: Implement weekly cleanups to eliminate database bloat, which in turn speeds up backend operations and maintains database efficiency.
- Engage the Crawler: Activate and configure the crawler to pre-warm your cache before anticipated traffic surges, consistently delivering snappy performance to all visitors.
It is important to remember that every WordPress site possesses its own unique characteristics. After applying these recommended settings, diligently test your website across a variety of devices and page types. Performance analysis tools such as Google PageSpeed Insights, GTmetrix, and WebPageTest are invaluable resources for tracking and verifying your improvements.
With the correct LiteSpeed Cache configuration, your WordPress site can deliver lightning-fast performance with minimal ongoing effort. This not only provides your users with a superior experience but also grants your business a significant competitive advantage in the digital landscape.
