This is part 2 of our 3-part series on making your WordPress site perform better through the magic of Content Delivery Networks and image optimization. In other words, we’re talking all about quick wins for your blog, without you having to learn any coding.
- Introduction to CDN and Image Optimization + Why You Should Care
- Top 3 CDN Services for Your WordPress Blog + How to Set One Up
- How to Optimize Images in WordPress the Quick and Easy Way
Okay, so Content Delivery Networks (CDN) are fairly complicated things under the hood. To be honest with you, I have no clue how they work on a cog-by-cog basis. But to simplify the idea greatly, it goes something like that:
In short, a CDN shortens the distance between your website and your audience. That’s all we really need to know because any other explanation would (a) require a university-level course to give it some proper in-depth attention, and (b) would just be boring.
(Here’s a Wikipedia article; in case you want to learn more about how CDNs actually work.)
So, let’s get to the fun stuff instead!
In the first part of this short series, we talked about why you should care about CDNs and what sort of benefits they can bring to your WordPress site. The only missing piece of the puzzle now is which CDN to choose?
There are a handful of popular services out there, both free and paid:
1. Jetpack’s Photon
Jetpack is one of the most popular free WordPress plugins of all time.
It offers a ton of features, which basically makes it a must-have on every WordPress-powered website. Just to name a few: you get an alternative comments system, contact forms, custom content types, social media integration, and etc. And among all those features, there’s also a module called Photon.
In short, it’s a CDN for your media files (images). It is free, and requires basically no work on your part at all. As soon as you activate that module, it will send your images over to the WordPress.com content network, and begin serving them from there.
Photon wins when it comes to ease of use. Again, you literally have to do nothing more than install the main Jetpack plugin and then enable the Photon module.
- Great for: Users who want to get started with a simple CDN right now(!), for free, and with minimal setup steps.
CloudFlare is gaining in popularity every month, and especially among WordPress users. It’s one of the few quality CDN services out there that offer a free plan, and its easy(ish) setup makes it possible to be used by anyone.
At the time of writing this, CloudFlare has 79 data centers all around the world, which basically guarantees good performance no matter where your target audience is located. CloudFlare reports that on the average, websites hooked up to their CDN load twice as fast and save more than 60 percent of their bandwidth (there are detailed analytics available in the admin panel, so you can check how the numbers play out for you when using CloudFlare).
Once you set it up, CloudFlare works automatically by caching your static files (meaning mostly media files) and delivering them to the visitors from a location near to them. On top of that, CloudFlare doesn’t charge for bandwidth used, so it’s going to cost you just the same regardless of the size of your traffic.
- Great for: Users who want to get started with something cheap or free, but who also want for their CDN to be able to grow with them. For instance, you can begin with their free plan, and then just upgrade if you ever need more features, better performance, or additional security protection.
3. Amazon CloudFront
Amazon CloudFront is the top 2 of the most popular CDN services on the web. Currently holding 19+ percent of the entire CDN market.
It’s hard to beat Amazon when it comes to the quality of their service and the size of the network that they offer. In short, what you get access to is basically the same network that Amazon uses for their own websites, stores and services.
One of Amazon’s strong points is also their pricing. First of all, Amazon offers something called AWS Free Usage Tier. As part of it, you can get started with CloudFront for free, and receive 50 GB of data transfer and 2,000,000 HTTP and HTTPS requests each month for one year. Then under paid plans, you get charged 3-12c per GB of transfer (based on the location).
To make Amazon CloudFront work with your WordPress site, you need to: (1) get an account with Amazon and handle all the configuration steps there, and (2) get the W3 Total Cache plugin – through which you will be able to establish a connection between Amazon CloudFront and your site.
- Great for: Users who are operating at scale and catering to a big audience that’s spread all over the world. Amazon has great scalability and their prices are very affordable even for huge volumes of traffic (within reason). Also, setting things up just perfectly does require a bit of skill or experience with Amazon’s platform.
How to set up CDN in WordPress
The following is a quick guide on how to integrate your WordPress site with one of the popular CDN services.
Now, in order to proceed, we need to pick a service that we’ll use as our example here.
Just to make things clear, I’m not saying that the service I’ve picked is the best one out there for everybody. It is, however, my personal favorite, and the one I tend to gravitate towards whenever I’m in need of a CDN. I like it for its moderately easy setup and the fact that there is a free plan available that’s probably more than enough for 90% of the users.
Okay, so my choice is CloudFlare.
Here’s how to integrate your WordPress site with it; just 2 steps:
1. Sign up to CloudFlare
The sign-up process is pretty basic. All you need to get started is to provide your email and password. Then, you get to add your WordPress website:
At this stage, a quick instruction video will be shown to you, and while you’re watching it, CloudFlare will scan your DNS records to prepare your configuration.
In the next step, you can read through the results of the auto-config, and either approve them by clicking the big “Continue” button, or add some more records of your own. In most cases, CloudFlare is very efficient at this stage and able to find all the records necessary on its own.
(The orange clouds indicate that a given type of traffic will be accelerated by CloudFlare.)
The next screen allows you to select the specific plan that you want to sign up to (good idea for starters is to just select “Free Website”):
2. Enable CloudFlare for WordPress
The last step is the most technical, but still nothing you shouldn’t be able to do yourself.
CloudFlare displays a nice step-by-step tutorial on everything that needs to be done to enable the CDN on your WordPress site. You can do two things with this information:
- (a) Either go through the process yourself, which isn’t too hard due to the nice visual presentation of the tutorial.
- Or, (b) take a screenshot of that tutorial page, and then contact the support team at your domain registrar and send that screenshot to them. Ask them to handle those tasks for you.
That’s pretty much it. At this point, your WordPress site is CloudFlare-enabled, and you can see your stats/data/state of your site performance in the CloudFlare dashboard.
Have you tested any CDN service yet?
(Next time: image optimization!)