Skip to content

The only Privacy solution for WordPress you can truly trust.

How to configure LiteSpeed Cache with My Agile Privacy®

Last updated: October 30, 2026

LiteSpeed Cache is a popular and powerful WordPress caching plugin, especially when used with LiteSpeed web servers. It offers a wide range of features to enhance site performance, including page caching, minification and combination of CSS and JavaScript files, deferred script loading, image optimization, database cleaning, and more.

With proper configuration, LiteSpeed Cache can work seamlessly with My Agile Privacy®, ensuring both optimal speed and full GDPR compliance. Here’s how to adjust LiteSpeed Cache to avoid conflicts with your privacy plugin:

Since My Agile Privacy® 3.4.1 the JavaScript exclusions are automatic: the plugin keeps its own scripts out of the LiteSpeed Cache optimizations by itself. The JavaScript steps below are for earlier versions, or if you still notice problems; the CSS exclusions are still recommended.

Excluding JavaScript Files

To make sure My Agile Privacy® runs smoothly, you must exclude certain JavaScript files from LiteSpeed Cache’s optimizations (both minification and deferred/lazy loading).
From your WordPress admin, go to LiteSpeed Cache > Page Optimization.
In the JS Excludes section, paste the following (one path per line):

/wp-content/plugins/myagileprivacy/frontend/js/anime.min.js
/wp-content/plugins/myagileprivacy/frontend/js/youtube_enforced_privacy.js
/wp-content/plugins/myagileprivacy/frontend/js/plain/my-agile-privacy-frontend.js
/wp-content/plugins/myagileprivacy/frontend/js/plain/my-agile-privacy-frontend.min.js
/wp-content/plugins/myagileprivacy/local-cache/my-agile-privacy/cookie-shield.js
/wp-content/plugins/myagileprivacy/local-cache/my-agile-privacy/MyAgilePrivacyIabTCF.js
/wp-content/plugins/myagileprivacy-advanced-features/assets/js/map-advanced.js
/wp-content/plugins/myagilepixel/frontend/js/myagilepixel.js
/wp-content/plugins/myagilepixel/frontend/js/myagilepixel.min.js
/wp-content/plugins/myagilepixel/local-cache/my-agile-pixel/myagilepixel.core.js
/wp-content/plugins/myagilepixel/local-cache/my-agile-pixel/myagilepixel.ga4.js
/wp-content/plugins/myagilepixel/local-cache/my-agile-pixel/myagilepixel.meta.js
/wp-content/plugins/myagilepixel/local-cache/my-agile-pixel/cookie-shield.js

On the same page, find the Deferred JS Excludes option and repeat the same list above.
Be sure to save your changes before continuing.

Excluding CSS Files

To avoid issues with how your cookie banner or privacy tools display, you’ll need to exclude My Agile Privacy®’s CSS files from optimization.

In LiteSpeed Cache > Page Optimization, open the [9] CSS Optimization tab.
Under CSS Excludes, add the following (one per line):

/wp-content/plugins/myagileprivacy/frontend/css/my-agile-privacy-reset.css
/wp-content/plugins/myagileprivacy/frontend/css/my-agile-privacy-reset.min.css
/wp-content/plugins/myagileprivacy/frontend/css/my-agile-privacy-frontend.css
/wp-content/plugins/myagileprivacy/frontend/css/my-agile-privacy-frontend.min.css
/wp-content/plugins/myagileprivacy/frontend/css/my-agile-privacy-notification-bar.css
/wp-content/plugins/myagileprivacy/frontend/css/my-agile-privacy-notification-bar.min.css
/wp-content/plugins/myagileprivacy/frontend/css/animate.min.css
/wp-content/plugins/myagilepixel/frontend/css/mapx.css
/wp-content/plugins/myagilepixel/frontend/css/mapx.min.css

Again, don’t forget to save.

Depending on your LiteSpeed Cache version and settings, you may also need to disable these options for full compatibility:

  • CSS minification
  • Combine CSS
  • Asynchronous CSS loading

If you need assistance or encounter problems, feel free to contact our support team or reach out to LiteSpeed Cache’s support.

FAQ - Frequently Asked Questions