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:

    Screenshot of WordPress admin panel

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

    Screenshot of WordPress plugin Add New option

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

    Screenshot of plugin search bar in WordPress

    The WP Super Cache plugin will appear:

    Screenshot of WP Super Cache installation box in WordPress

  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

    Screenshot of WP Super Cache link in Settings tab of WordPress sidebar

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

    Screenshot of the caching on or off section under the 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:

    Screenshot of options under the Advanced tab in WP Super Cache settings

    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:

    wp-super-cache-enable-cdn-support-box.png

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

    wp-super-cache-additional-cnames-box.png

     

  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
Powered by Zendesk