Atomic Smash homepage splash

Adding a Content Delivery network for super fast WordPress assets [easy]

Words by David DarkeMay 26, 2017

The largest resources web servers have to deal with are images and videos. Oversized / slow loading images can seriously effect the page load speed of your site and in turn damage SEO rankings. Content Delivery Networks are designed to remove pressure from your webserver and help with this asset delivery.

How do CDNs work?

Simply put, a CDN takes a copy of a selection of fixed assets that exist on your site, and makes then available via dramatically faster servers that will be more geographically relevant to any enduser.

It’s able to know which assets to pull simply by what your users are requesting. When someone opens a page, it checks the CDN to see if the required images/files are available, if they aren’t the CDN will go the origin web server to pull (copy) these assets. From that point the CDN won’t need to talk to the origin server, it will just server up the copies it saved.

This means that all assets don’t need to be mass uploaded to the CDN to keep in sync. The CDN’s library of content will just build itself as users request pages and any future files will be automatically synced.

Our CND of choice is KeyCND, it’s UI is easy to navigate and their uptime and speed is great, it’s also very cost effective. These are two simplest options to get going:

1. Download the Cache Enabler plugin by KeyCDN

plugin for keycdn

KeyCDN actually provide a plugin to link their service with your website. It’s plugin is a quick install but even though this is very straightforward, it’s just another dependancy that needs to be maintained on the site. So to remove the need for this, you can actually enable a number of CNDs through most caching plugins (which you should have on your site anyway).

2. Adding details to W3 Total Cache plugin

First go to Performance > General Settings, scroll down and select these options inside the CDN panel:

select-cdn-type

Once complete go to PerformanceCDN and add your CDN url that can be obtained from within your KeyCDN account.

That’s it!  ?

As well as installing a CND, it’s also important to start optimising your images. Here is our comparison to help you choose which optimisation tool to use.

Testing the CDN

Once activated, there are a couple of tricks to testing the CDN is actually working. Within the KeyCDN dashboard you should start to see delivery analytics:

keycdn-dashboard

Also another simple test is to open any image in a new tab:

Then check to see if the asset url is pointing to KeyCDN:

Last but not least, it’s definitely worth running your site through a page speed checking service and even checking against average page load times within your analytics to see the improvements.

Wordpress Optimisation

1

Comparing WordPress image optimisation tools to speed up your page loading

Over the next couple of months we'll be covering topics that will help speed up your site, this will improve user experience and help with your general SEO efforts.

2

Adding a Content Delivery network for super fast WordPress assets [easy]

Add a Content Delivery Network - CDN to your Wordpress Site in a couple of clicks

3

Add caching to WordPress [easy]

Speed up your site and increase possible traffic by using a WordPress Caching solution

4

Are simple errors and number of assets in your code slowing your site down? [intermediate]

Coming soon.

5

Full site PHP debugging to fix slow sites [Hard]

Coming soon.

Profile picture of David Darke

David Darke

As the lead developer and co-founder at Atomic Smash, David’s wealth of knowledge in website development means that all sites work seamlessly across desktop, tablet and mobile devices.

Go back to top

Keep up to date with Atomic news