WP Super Cache is a web performance plugin that helps web administrators manage caching behavior inside the WordPress CMS. It comes with a built-in feature for integrating the StackPath CDN, as well as other web performance features.
This article will walk you through how to perform a static assets integration, which does not support the use of the StackPath Web Application Firewall (WAF). If you're looking to maximize security by using our CDN with the WAF, please refer to the CDN & WAF integration guide.
Before you begin, we highly recommend you test the performance of your site using Google Page Speed or Pingdom Tools. You can test your site now and after setting up the plugin for a before and after performance comparison.
This tutorial assumes you've already completed the steps to create a StackPath Site.
Log in to the WordPress admin panel:
On the left-hand sidebar, hover over Plugins and select Add New:
In the plugin search box, type WP Super Cache and press Enter on your keyboard.
The WP Super Cache plugin will appear:
Click Install Now.
After WP Super Cache is installed, select the Activate Plugin link.
On the main WordPress dashboard, hover over the Settings tab on the left sidebar and select WP Super Cache
Select the Easy tab on the top navigation bar. Then tick the Caching On option and select Update Status:
Select the Advanced tab and configure the options to best fit your website. Here are options Stackpath recommends configuring:
Tick the box next to Enable Caching.
- Confirm that the Cache Delivery Method is set to Simple.
- 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:
Click Update Status, leaving the rest of the options as is.
Select the CDN tab and tick the Enable CDN Support box:
In the box next to Site URL enter your website URL
In the box next to Off-site URL, enter the Edge Address prefixed with the protocol for your Edge Address (http:// or https://).
Enter any additional delivery domains (such as a custom vanity URL) in the box next to Additional CNAMES:
Select Save Changes.
Select the Contents tab and click Delete Cache to make sure cached content is fresh.
Verify the source code of any page to confirm that the CDN domain is being used for static assets instead of your origin domain. Your Edge Address should precede directories designated for static content.
Example: something.stackpathcdn.com/images/image-1.png NOT company.com/images/image-1.png
Test Speed and SEO after Stackpath CDN is Enabled
At this time, you should perform another speed test by using Google Page Speed and Pingdom Tools.
Compare the before and after tests and note that it can take one to seven days for your site to reflect the performance improvements of a CDN. Both of these test sites also will give you SEO recommendations that you can follow.
Feel free to take a look at these articles for some possible next steps with your CDN Integration:
We are always happy to help answer questions and to help make sure you experience the fastest and most secure experience with Stackpath CDN.