# WP Rocket WordPress Plugin

WP Rocket is a **premium caching plugin** for WordPress designed to enhance your website’s performance by optimizing page loading speeds. However, Sirdata CMP scripts must be excluded from optimizations to ensure proper functionality and compliance. Follow these steps to configure the exclusions.

***

**Steps to Exclude Sirdata CMP's Hosts in WP Rocket**

1. **Access WP Rocket Settings**
   * Log in to your WordPress Admin Dashboard.
   * Navigate to **Settings > WP Rocket**.
2. **Exclude Hosts from JavaScript Optimization**
   * In the WP Rocket settings menu, click on the **File Optimization** tab.
   * Scroll down to the **JavaScript Files** section.
   * Locate the **Excluded JavaScript Files** field.
   * Add the following entries to the field (one per line):

     ```
     .consentframework.com
     .abconsent.net
     ```
3. **Exclude Hosts from Deferred JavaScript**
   * In the same **File Optimization** tab, find the **Deferred JavaScript Exclusions** field.
   * Add the same entries to this field:

     ```
     .consentframework.com
     .abconsent.net
     ```
4. **Exclude Hosts from Delayed JavaScript Execution**
   * In the **File Optimization** tab, locate the **Delay JavaScript Execution** section.
   * Under the **Excluded JavaScript** field, add the following entries:

     ```
     .consentframework.com
     .abconsent.net
     ```
5. **Save Changes**
   * Once you’ve added the exclusions in all the relevant fields, scroll down and click the **Save Changes** button to apply the settings.
6. **Purge Cache**
   * Navigate to the **Dashboard** tab in WP Rocket.
   * Click the **Clear Cache** button to ensure that all cached files are refreshed with the updated exclusion rules.

***

**Why These Exclusions Are Important**

* **Compliance with Dynamic Content**: The scripts hosted on `.consentframework.com` and `.abconsent.net` are geolocated and dynamic, meaning they adapt to the user’s location and preferences. Caching or delaying these scripts can result in incorrect or outdated content being served.
* **Regulatory Compliance**: These scripts are essential for ensuring compliance with evolving privacy laws. Any interference through caching or optimization can lead to regulatory violations or loss of functionality.

***

By following these steps, WP Rocket will exclude the specified hosts from caching and JavaScript optimizations, ensuring proper functionality and compliance.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cmp.docs.sirdata.net/en/install/cache-systems-exclusion/wp-rocket-wordpress-plugin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
