You are viewing the legacy StackPath SecureCDN Help Center. Please use support.stackpath.com if you signed up after July 1, 2018 or log in through control.stackpath.com

StackPath Support

WordPress with WP Super Cache: StackPath CDN Setup Guide

WP Super Cache is a web performance plugin that helps web administrators manage caching inside the WordPress CMS. It comes with a built-in feature for integrating the StackPath SecureCDN, as well as other web performance features.

This tutorial assumes a site is created

Installation

  1. Log in to the WordPress admin panel:

    wplogin.png

  2. On the left-hand sidebar, hover over Plugins and select Add New:

    wpplugins.png

  3. In the plugin search box, type WP Super Cache. Then press Enter on your keyboard:

    WordPress search box

    The WP Super Cache plugin will appear:

    WP Super Cache plugin

  4. Click Install Now.

  5. After WP Super Cache is installed, select the Activate Plugin link.

Configuration

  1. On the main WordPress dashboard, hover over the Settings tab on the left sidebar and select WP Super Cache

    WordPress settings menu

  2. Select the tab named Easy in the top navigation bar. Then tick the Caching On option and select Update Status:

    WP Super Cache easy tab

  3. Select the Advanced tab and configure the options to best fit your website. Here are options Stackpath recommends configuring:

      • Tick the box next to Cache hits to this website for quick access and the box next to Caching.

      • Tick the box next to Use mod_rewrite to serve cache files. This will disable the Legacy page caching box.

      • Under Miscellaneous, tick boxes next to the following options:
        • Compress pages so they’re served more quickly to visitors
        • Don’t cache pages for known users
        • Cache rebuild. Serve a supercache file to anonymous users while a new file is being generated

    The options under the Advanced tab should be configured like this:

    WP Super Cache advanced tab

    If you need 304 caching, use the php caching method as it can’t work with mod_rewrite. Also, the php method has a performance advantage compared to legacy mode.

  4. Click Update Status, leaving the rest of the options as is.

    If a message with Update Mod_Rewrite Rules appears, scroll down the page, find the mod_rewrite option, tick the box, then update the status again.

  5. Select the CDN tab and tick the Enable CDN Support box:

  6. In the box next to Off-site url, enter the SCD(CDN) URL prefixed with http:// (Example: http://site-company.stackpathdns.com). If you’re using a custom CDN domain such as cdn.domain.com, enter that into the text field instead:

    Off-site URL box

  7. Enter the same CDN URL in the box next to Additional CNAMES:

    Additional CNAMES

     

  8. Click Save Changes.

  9. Select the Contents tab and click Delete Cache to make sure cached content is fresh.

View the source code of any page to confirm that the CDN domain is being used for static assets instead of your origin domain. Your CDN URL should precede directories designated for static content.

Example: site-company.stackpathdns.com/images/image-1.png NOT company.com/images/image-1.png

Return to top