> ## Documentation Index
> Fetch the complete documentation index at: https://gcore-doc-2189.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrate a CDN resource with WordPress using WP Super Cache

WP Super Cache is a WordPress plugin that rewrites static file URLs so browsers request those files from a Gcore CDN custom domain instead of the origin. A [CDN resource](/cdn/getting-started/create-a-cdn-resource/create-a-cdn-resource) must exist first, and the [custom domain](/cdn/cdn-resource-options/general/create-and-set-a-custom-domain-for-the-content-delivery-via-cdn) must have a CNAME record pointing to the `*.gcdn.co` target shown in the CDN resource's **Setup guide**.

<Warning>
  Back up the WordPress files and database before installing the plugin. These steps assume a default WordPress file layout. A heavily customized layout might not rewrite URLs correctly.
</Warning>

## WP Super Cache plugin setup

WP Super Cache adds a **WP Super Cache** item under **Settings** after it is activated.

<Steps>
  <Step title="Open the plugin installer">
    Log in to WordPress admin (`example.com/wp-admin`) and navigate to **Plugins** > **Add Plugin**.
  </Step>

  <Step title="Install and activate the plugin">
    In **Search Plugins**, enter `WP Super Cache`. On the WP Super Cache card by Automattic, click **Install Now**, then **Activate**.
  </Step>
</Steps>

## WP Super Cache CDN settings

Simple CDN is the WP Super Cache form used with Gcore. It replaces origin hostnames in static file URLs with the value in **Off-site URL**.

<Steps>
  <Step title="Open Simple CDN">
    Navigate to **Settings** > **WP Super Cache** and select the **CDN** tab. Gcore settings are in the **Simple CDN** section.
  </Step>

  <Step title="Enter the custom domain">
    Fill in the Simple CDN form:

    1. Select **Enable CDN Support**.

    2. Leave **Site URL** as the WordPress origin URL, with no trailing slash.

    3. In **Off-site URL**, enter the custom domain from the [Gcore Customer Portal](https://portal.gcore.com) (**CDN** > **CDN resources**), including the `https://` scheme and with no trailing slash. Use the custom domain (`cdn.example.com`), not the `gcdn.co` hostname.

    4. For HTTPS WordPress sites, use an HTTPS custom domain with a valid certificate so all assets are rewritten to CDN. If the CDN domain does not yet have a certificate, select **Skip https URLs to avoid "mixed content" errors** as a temporary fallback — this keeps HTTPS origin URLs unmodified and effectively disables CDN rewriting for HTTPS assets until the certificate is in place.

    5. Click **Save Changes**.

    6. In **Settings** > **WP Super Cache**, open the **Contents** tab. Under **Delete Cached Pages**, select **Delete Cache** to clear existing cached HTML. Otherwise, cached pages continue to use origin URLs.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-2189/0F6zbjGaUPHpTqJv/images/docs/cdn/getting-started/integrate-cdn-with-cms/wordpress/integrate-cdn-resource-with-wordpress-wp-supercache-plugin/wp-super-cache.png?fit=max&auto=format&n=0F6zbjGaUPHpTqJv&q=85&s=d999f45da96e186db05c5e2b5d7f5277" alt="Simple CDN form with Enable CDN Support selected and Off-site URL set to a custom domain" width="535" height="807" data-path="images/docs/cdn/getting-started/integrate-cdn-with-cms/wordpress/integrate-cdn-resource-with-wordpress-wp-supercache-plugin/wp-super-cache.png" />
    </Frame>
  </Step>

  <Step title="Confirm CDN delivery">
    Open the site in a logged-out private browser window. In browser developer tools, open **Network**, disable the browser cache, and reload the page. Static files should request the custom domain instead of the origin hostname. Select a cached asset and confirm that a repeated request returns `HIT` in the `Cache` response header.
  </Step>
</Steps>
