> For the complete documentation index, see [llms.txt](https://cmp.docs.sirdata.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cmp.docs.sirdata.net/en/install/cache-systems-exclusion/sg-optimizer-wordpress-plugin.md).

# SG Optimizer WordPress Plugin

SG Optimizer is a performance optimization plugin provided by SiteGround to enhance website speed and efficiency. To ensure the proper functionality of Sirdata CMP scripts, it’s essential to exclude them from SG Optimizer’s caching and optimization processes.

***

**Steps to Exclude Sirdata CMP Scripts in SG Optimizer**

1. **Access SG Optimizer Settings**
   * Log in to your WordPress Admin Dashboard.
   * Navigate to **SG Optimizer** in the left-hand menu.
2. **Exclude Sirdata CMP Scripts from JavaScript Optimization**
   * In the **Frontend Optimization** tab, locate the **Exclude JavaScript Files** section.
   * Add the following entries (one per line):

     ```
     .consentframework.com
     .abconsent.net
     ```
3. **Exclude Sirdata CMP Scripts from Caching**
   * Go to the **Caching** tab in SG Optimizer.
   * Under **Exclude URLs from Caching**, add any pages where Sirdata CMP scripts are critical, or use the following patterns to exclude scripts directly:

     ```
     *consentframework.com*
     *abconsent.net*
     ```
4. **Disable Additional Optimizations (if applicable)**
   * If features such as Minify JavaScript or Combine JavaScript Files are enabled, ensure the scripts listed above are excluded from these processes. You can manage this in the **Frontend Optimization** tab.
5. **Purge Cache**
   * After making changes, return to the **Caching** tab.
   * Click **Purge Cache** to clear all cached files and ensure the new rules are applied.
6. **Test the Exclusions**
   * Visit your website and verify that Sirdata CMP scripts are working as expected. Use browser DevTools to ensure these scripts are loading correctly without interference.

***

**Why Exclude Sirdata CMP Scripts?**

* **Dynamic and Geolocated Behavior**: Sirdata CMP scripts dynamically adapt based on user location and preferences. Optimizing or caching these scripts can lead to incorrect or outdated behavior.
* **Regulatory Compliance**: These scripts are essential for meeting privacy regulations. Any interference caused by caching or optimization may result in non-compliance, complaints, or loss of revenue.

***

By following these steps, SG Optimizer will exclude Sirdata CMP scripts from its caching and optimization processes, ensuring proper functionality and compliance.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cmp.docs.sirdata.net/en/install/cache-systems-exclusion/sg-optimizer-wordpress-plugin.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
