Helpdesk
/
Wp Edition

How to configure LiteSpeed Cache with My Agile Privacy

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:

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/my-agile-privacy-frontend.js
/wp-content/plugins/myagileprivacy/frontend/js/anime.js
/wp-content/local-cache/my-agile-privacy/cookie-shield.js
/wp-content/local-cache/my-agile-privacy/MyAgilePrivacyIabTCF.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/myagilepixel/frontend/js/myagilepixel.js
/wp-content/local-cache/my-agile-pixel/cookie-shield.js
/wp-content/local-cache/my-agile-pixel/myagilepixel.js
/wp-content/plugins/myagilepixel/local-cache/my-agile-pixel/cookie-shield.js
/wp-content/plugins/myagilepixel/local-cache/my-agile-pixel/myagilepixel.js

On the same page, find the JS Deferred/Delayed 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-frontend.css
/wp-content/plugins/myagileprivacy/frontend/css/my-agile-privacy-notification-bar.css
/wp-content/plugins/myagilepixel/frontend/css/mapx.css
/wp-content/plugins/myagileprivacy/frontend/css/animate.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.

Navigazione rapida
rely on our experts for a professional installation service
a Formula Agile SRL project
COE / TAX ID 31366
Via Tre Settembre, 99 - 47891 Dogana - San Marino - RSM
Share capital 26'000€
For assistance: info[at]myagileprivacy.com
GDPR and privacy present complexities that extend beyond achieving website compliance. Compliance obligations span across all business aspects and necessitate expert analysis.
When it comes to implementing Banners and Policies, trust My Agile Privacy—the only solution that excludes unnecessary implementations not mandated by regulations.
Logo CMP partner GoogleLogo CMP partner GoogleLogo CMP partner GoogleLogo IAB Europe approvedLogo IAB Europe approved