Most plugins and themes can be used with LiteSpeed Cache out of the box, with no issues, requiring no additional configuration. However, some plugins require additional configuration because their features overlap with LiteSpeed Cache.
Partial list of these plugins:
- Elementor
- WooCommerce
- Contact Form 7
- Duplicator Pro
- WP-Postviews
- Ad Inserter
- Autoptimize
- Caldera Forms
- iThemes Security Pro
- WP REST API Authentication
- WP Touch
- YITH Wishlist
- Yoast SEO
The full list can be found on the LiteSpeed website:https://docs.litespeedtech.com/lscache/lscwp/thirdparty
If you use the plugins above, configure them as described below. Make sure to thoroughly test your site before going live after making any changes.
To install LiteSpeed Cache, refer to this guide:
How to install LiteSpeed Cache?
Cloudflare APO
If you are using Cloudflare, and APO is enabled, disable it in Cloudflare. You do not need to disable Cloudflare; only APO needs to be disabled.
Cloudflare APO's (Automatic Platform Optimization) caching and optimization features overlap LiteSpeed Cache's optimization features.
Elementor
Elementor is fully compatible with LiteSpeed Cache. It requires additional configuration to prevent conflicts between Elementor's optimizations and LiteSpeed Cache's page optimization features (CSS and JavaScript Minification and Combination, Lazy Loading, and Image Placeholders).
Set the following values in Elementor Settings > Performance:
- CSS Print Method: Do not change if the website frontend is working as expected.
- Optimized Image Loading: Disable
- Optimized Gutenberg Loading: Enable
Go to Elementor Settings > Features and set the following values:
- Inline Font Icons: Active
- Additional Custom Breakpoints: Inactive
- Lazy Load Background Images: Inactive
WooCommerce
Configure these settings if you use WooCommerce:
Enable ESI (Edge Side Includes):
- Log in to WordPress Dashboard.
- Go to LiteSpeed Cache > Cache > ESI.
- Set "Enable ESI" to "ON".
- Save Changes.
Product Update Interval:
- Log in to WordPress Dashboard.
- Go to LiteSpeed Cache > Cache > WooCommerce.
- Select an option that suits your use case.
- Save Changes.
ESI is especially needed for the "Recently Viewed Products" widget. More information on what ESI is and why you might need it:https://docs.litespeedtech.com/lscache/lscwp/cache/#esi-tab
More information on "Product Update Interval" can be found here:https://docs.litespeedtech.com/lscache/lscwp/cache/#product-update-interval
Contact Form 7
LiteSpeed Cache:
- Purge cache after creating/editing a form.
- Set TTL to 24 hours (86400 seconds) or less.
Custom JavaScript:
If you add custom values to your form using JavaScript, add the following line before your code. Do not add it if you do not add custom values using JavaScript:
wpcf7.cached = false
CF7 resets all forms on load when cache is enabled, and loses any changes made via JavaScript. The above code prevents the form from resetting.
Duplicator Pro
Add the following code to your cache root .htaccess file:
# BEGIN LiteSpeed noabort<IfModule rewrite_module>RewriteEngine OnRewriteRule (wp-cron|duplicator-pro-main|duplicator-pro)\.php - [E=noabort:1]</IfModule># END liteSpeed noabort
WP-Postviews
It is incompatible with LiteSpeed Cache. You can manually modify the plugin to make it compatible:
Replace the following code:
<?php if(function_exists('the_views')) { the_views(); } ?>
With this code:
<div id="postviews_lscwp"></div>
Replace the Ajax query in wp-content/plugins/wp-postviews/postviews-cache.js with the following code:
jQuery.ajax({ type:"GET", url:viewsCacheL10n.admin_ajax_url, data:"postviews_id="+viewsCacheL10n.post_id+"&action=postviews", cache:!1, success:function(data) { if(data) { jQuery('#postviews_lscwp').html(data+' views'); } } });
Note:
Any changes you make directly to plugin files will be lost after updating the plugin.
Other Plugins
The following is a partial list of other plugins that require additional configuration.
Ad Inserter: Incompatible when Ad Inserter has Caching enabled.
Autoptimize: Uninstall Autoptimize or disable LSCWP Page Optimization features.
Caldera Forms: Set Enable ESI to ON in Cache > ESI.
iThemes Security Pro: Add /wp-content/plugins/litespeed-cache/guest.vary.php to allowlist.
WP Touch: Set Cache Mobile to ON in Cache > Cache.
Yoast SEO: Purge cache on activation/deactivation.
WP REST API Authentication
Incompatible with optimization features. It blocks the /litespeed/v1 REST API endpoint, which is required for all optimization and CDN services provided via QUIC.cloud
YITH Wishlist
Define CacheEngine on esi combine (or CacheEngine on crawler esi combine if you are using the crawler) in the Apache config file.*
*Available on VPS, Quasi, and Dedicated Servers only.
