In this article I am going to explain how to implement the StackPath CDN into your WordPress website using WP Fastest Cache and thereby increase your Google Page Speed score. I decided to write this article for a few reasons. Since I began building WordPress websites, I have studied speed optimization to an obsessive point.

Website speed is not just a luxury, it is crucial depending on the type of site you have. Several big internet names have conducted studies over the last decade related to page speed.

  • In 2006 Google experimented with displaying 30 results per page instead of 10. This move added an average of 0.5 seconds to the load time. Traffic decreased by 20%.
  • Another Google study concluded that slowing its load time by four-tenths of a second would cost them 8 million lost searches per day.
  • Amazon has estimated that a 1 second load delay could cost it $1.6 billion in yearly sales.

While these figures are revealing for major internet giants, I think they have a more meaningful impact for small websites.  If Amazon loads slow for me today, I might say screw it and go back later. If your one-off retail website is slow, I may say screw and never remember to come back. First impressions matter. Page speed is your first impression.

Increasing Speed and Maintaining Function

Anyone who is familiar with WordPress knows that there are hundreds of plugins that you can download to increase speed. The major one is WT3C. I have used it and to be honest I’m not a fan. WT3C has such dense settings that it is overwhelming to the average Joe. It also has cross site scripting vulnerabilities. You can read about those more on the Yoast blog. In a few instances I assisted on site migrations in which the site had WT3C activated and it cause tremendous issues.

There are also many smaller plugins you can download that claim to make your site fast. Word of caution: if you’re not a programmer, you don’t know what the hell they do. I for one don’t recommend these plugins. Most are not supported and are frequently out-of-date. In fact, I’ve seen clients download caching plugins that have not been tested on their version of WordPress and blow up their entire site. Don’t be that guy. Or gal.

If we are going to speed up a WordPress site we are going to do it intelligently and without loss of function.

Game Plan

We are going to be installing a fast and light cache plugin on our WordPress site and configuring it. Next, we are going integrate the plugin with a content distribution network (CDN). Then, for some final tweaks we will optimize images and make sure our database is clean.

Doing all this will cost you $40 dollars to start. On this site, I was able to achieve Google Page Speed scores in the high 90’s (on shared hosting too).

Google Page Speed Score after CDN

 

Step 1: Install WP Fastest Cache

Thus far, WP Fastest Cache has has been the best cache plugin I’ve used to date. It is light on resource usage and the settings are easy to understand for most people. Best of all it gives you the tools you need and trims the fat elsewhere. There is nothing in this plugin that isn’t useful.

So download it. Activate it, and go to the control panel. You should see the screen below. Click “premium” and buy / activate the premium version of the plugin. This is the $40 I mentioned earlier.

WP fastest Cache

Just as you see in the image above, check all the boxes and hit save. If you go run your site through Google Pagespeed Insights, you should already see an improvement in your stats.

 

Step 2: Setting up Stackpath CDN

Stackpath is a great CDN and Web Application Firewall (WAF) service. You can register for free for the first 15 days, after that it is $20 per month. Money well spent, in my opinion.

For those that may not understand what at CDN is, I want you to think of McDonalds. McDonalds is a CDN for cheeseburgers. No matter where I am in the US, I am close to a McDonalds, and a McDonald’s cheeseburger in Chicago is the same as in New York.

A CDN does the same thing with website resources. It stores copies of your website and serves it to visitors from different locations closest to them.

Once you sign up for Stackpath, you need to configure your account for your website. Click “Create Site” and you will be taken through the setup wizard for adding a new site.

For those who may be entering unfamiliar territory here, don’t freak out, I’ll walk you through it.

1. Select the option to run your entire site through the CDN.

Stackpath step one

2. Enter the domain name of your site. DO NOT include “http” or “https” in the address. 

stackpath step 2

3. Enter a name for your CDN configuration, you can call it whatever you want, doesn’t matter. Leave the default Custom Host Header. Use the dropdown menu to select if your site protocol is HTTP or HTTPS. The Web Server IP will populate automatically, don’t mess with it. Toggle the WAF to on. Pick a location in the country where you reside. Click “Create Site.”

stackpath step 3

 

4. Once you’ve created your site, you will be taken to the admin dashboard for your CDN settings. There is some important information here that we will need to reference later, so keep this screen up. On the dashboard, on the right, find the column called “Edge Settings” and check the boxes in the image below. Update the settings.

edge settings for stackpath

Step 3: Integrate Stackpath with WP Faster Cache

Don’t crap your pants. We aren’t actually programming a true integration. WP Fastest Cache comes with some pre-built connectors for integrating CDNs.

Within your WordPress admin dashboard, go back to the settings for WP Faster Cache. Navigate to the CDN tab and select “Max CDN.” You will be prompted to enter your CDN URL and Origin URL. Both of these can be copy /pasted from your StackPath settings dashboard.

stackpath integration

Click “Next” and your integration should now be implemented. For good measure make sure you purge your cache and then go flip through your site to make sure that everything is displaying properly.

Run your website through Google Pagespeed Insights to see how your website now performs. You should see a significant difference in loading speed a and overall performance.

Additional Tweaks

There are a few more things we can do to boost performance further. They are simple, fast, and require a low level of effort. Oh, and they are almost impossible to screw up.

First, download WP Smush. This is an image optimization plugin that will automatically compress your image files when you upload them to your media folder. Once installed, run the setup wizard to crunch your images files into smaller sizes.

Next, download and activate WP-Optimize. This is a light weight database cleaning tool. It cleans out post revisions and orphaned data in your database tables. This results in faster calls from your web server to your database and all around keeps performance snappy.

 

If you’ve implemented this on your website, comment below and let me know how it went.