This tutorial will walk you through the steps to set up the WP Supercache plugin to use MaxCDN.
This tutorial assumes you have already created a Pull Zone.
Installation
- Log into your WordPress admin panel
- Hover your mouse over Plugins and select Add New
- In the Search box, type WP Super Cache and select Search Plugins
- The first option will be WP Super Cache and in the Description box, it will show that the plugin is created by Donncha O Caoimh. This is the plugin you need to install.
- Select Install Now. A prompt dialog will open and ask if you are sure you want to install the plugin, select OK. After the plugin is installed, then select Activate Plugin.
- You should see a yellow box advising -
WP Super Cache is disabled. Please go to the plugin admin page to enable caching.
Select the plugin admin page to go to the settings page. -
The settings for WP Super Cache can be found under the Settings menu in the WordPress admin dashboard
There! Now you are ready to configure the plugin's options.
Configuration
- Log into your WordPress admin panel, scroll down to the Settings link on the left panel, and select WP Super Cache
- The first tab is called Easy. Ticking the Caching On option and then selecting Update Status.
- The next step is to select Advanced and start setting the options that best fit your blog. We have listed the recommended settings below, but of course, the best settings for your blog may be different.
- Tick the Cache hits to this website for quick access checkbox next to Caching."(Recommended)
- Tick the Use mod_rewrite to serve cache files radio box. (Recommended)
- Under Miscellaneous, make sure to tick the checkboxes next to the following options:
- Compress pages so they’re served more quickly to visitors. (Recommended)
- Don’t cache pages for known users. (Recommended)
- Cache rebuild. Serve a supercache file to anonymous users while a new file is being generated. (Recommended)
If you should need “304 caching,” make sure to use the php caching method as it can’t work side by side with mod_rewrite. Also, the php method has a performance advantage compared to legacy mode.
- You can leave the rest of the option as they are, no changes.
- Select Update Status
- After that, you may get a message asking you to Update Mod_Rewrite Rules, so scroll down the page until you find that option, and then click the button
- Now select the CDN tab.
- Tick the Enable CDN Support checkbox.
- In the box next to the Off-site URL box, enter your CDN URL prefixed with
http://
. You can use the Temporary CDN URL which you have been given after you have created your Pull Zone. If you are using a Custom Domain, such as cdn.mysite.com, you can input that in the text box. - Insert the same URL in the box next to Additional CNAMES
- Tick the checkbox called Skip https URLs to avoid mixed content errors -- this will prevent any SSL errors if you have some parts of your website under SSL. Enable this option only if you do not have a Custom or Shared SSL CDN URL.
- All done. Select Save Changes.
- Not always necessary, but you can select on Contents and Delete Cache to make sure the cached contents of WP Super Cache contents are fresh.
To ensure you implemented MaxCDN correctly, you can view the source code of any page to confirm that the CDN domain is being used for static assets instead of your origin domain. You can also use tools like pingdom, gtmetrix, webpagetest that can give you more detailed reports on your CDN implementation status.
As always, If you have any questions or concerns about any of the topics mentioned in this article, please feel free to reach out to support - we are available 24/7 by chat or email.