Skip to content

Documentation

WP Rocket Compatibility

WP Rocket Compatibility

Last updated Mar 24, 2026

The Problem

WP Rocket optimises JavaScript files on your site to improve page load speed. However, cookie consent banners need to load early - before other scripts run - to properly block tracking cookies and comply with privacy regulations like GDPR and CCPA.

When WP Rocket minifies, defers, or delays the Kukie.io banner script, the banner may not appear at all, or it may load too late to block cookies effectively.

Symptoms

If WP Rocket is interfering with your cookie banner, you may notice:

  • The cookie banner does not appear on your site
  • The banner appears briefly then disappears
  • The banner loads after a delay (only after scrolling or clicking)
  • Cookies are set before the visitor has given consent

Automatic Detection

If you are using the Kukie WordPress plugin (version 1.2.0+), it automatically detects WP Rocket and shows a warning in your WordPress admin when exclusions are missing. Follow the instructions in the notice to resolve the issue.

How to Fix

You need to exclude the Kukie.io banner script from three WP Rocket optimisation features. Go to Settings > WP Rocket > File Optimization in your WordPress admin.

Step 1: Exclude from Minify JavaScript

If Minify JavaScript files is enabled, scroll down to Excluded JavaScript Files and add:

cdn.kukie.io

Step 2: Exclude from Defer JavaScript

If Load JavaScript deferred is enabled, scroll down to its Excluded JavaScript Files field and add:

cdn.kukie.io

Step 3: Exclude from Delay JavaScript

If Delay JavaScript execution is enabled, scroll down to its Excluded JavaScript Files field and add:

cdn.kukie.io

Step 4: Clear Cache

After saving the exclusions, clear your WP Rocket cache: go to WP Rocket > Dashboard and click Clear Cache. Then check your site in an incognito/private browser window to verify the banner appears correctly.

Tip: You only need to add exclusions for the features that are actually enabled. If "Delay JavaScript execution" is turned off, you can skip Step 3.

Automatic Protection

If you are using the Kukie WordPress plugin (version 1.2.0+), the banner script tag automatically includes data-no-minify="1", data-no-defer="1", and data-no-delay="1" attributes. WP Rocket recognises these attributes and should skip the script automatically.

However, we still recommend adding the manual exclusion as described above for complete protection - some WP Rocket configurations may not honour the data attributes in all cases.

Need Help?

If you have followed these steps and your banner is still not loading, contact our support team and include the URL of your site so we can investigate.

Was this helpful?