WordPress CDN integration

0
140

Let’s start, there’s no time to be wasted.

Choose a CDN service provider

I’m gonna list the ones I’ve tried: KeyCDN, MaxCDN, Incapsula, Cloudflare, Google CDN. So, when I say ”tried”, it wasn’t just for a day, no sir, for 2 months at least.
KeyCDN and MaxCDN are 99,99% the same (KeyCDN is cheaper and has some cool features I needed). I would suggest these two for all user levels, beginner to professional.
With Incapsula I had issues, maybe their service is now more friendly, but I needed support quite often. It was all with the configuration, and lack of instructions in their documentation.

Cloudflare is great, it even provides some extra protection to your site, like keeping DoS attacks away. You can really do wonders with it, and it has a super free plan. The huge plus is the easy integration trough CPanel, if you have one. The downside is that you have to use “www” with your domain.

With the first two providers I never had issues. I have to mention that the best support came from the MaxCDN team, located in Belgrade, Serbia. The support was very personal and super helpful, sometimes I just went there to brag about what I managed to accomplish using their CDN (trivial geek stuff).

Google CDN: the name says everything. I would not recommend GoogleCDN or Google Cloud storage services to anyone just starting with this kind of stuff. It just gets tricky sometimes. The big plus for the Google is that I never needed any kind of support from them, all you need to know is in their documentation, but anyway, the beginners should avoid it unless they know what to do exactly (and following my blog just might get you to do w/e you need on GCP (Google cloud platform)) :).

Integration

The easiest part is at integration. You ‘just’ need to install the plugin which supports CDN.
Usually people use some kind of caching plugins to do it, like WP Super cache, W3 total cache, WP rocket or WP Fastest Cache or even KeyCDN’s Cache enabler.
Each of these plugins has it’s own integration guide, therefore
I won’t be doing any ‘copy-paste’ things here. This is the easiest part and I really hope anyone reading this knows how to follow simple instructions on any chosen plugin within it’s respective documentation.

Seting it up

KeyCDN for example, needs from you to create a pull or a push zone before you can use the service effectively. As I said, I won’t be doing any ‘copy-paste’ things, because it is always better to read the original documentation from whichever service you are using.
For KeyCDN you can read this guide: 5 easy steps, Create a Zonealias, Create a Pull zone, Create a Push zone … are everything you need to do in order to use the service. In case you need more on how to do things, their documentation is great.

If you are using WP Rocket (like me), then your setup page looks pretty simple:
(don’t worry, all these plugins have similar interface which is very easy to work with)..
WP Rocket allows you to choose which CNAME will be used for which type of files and you can exclude specific files not to serve, even if it is a file type that you chose to serve from CDN. You don’t have to serve all your files through CDN, maybe you just want images there, therefore you need just one CNAME.

wprocket cdn settings
WP Rocket CDN settings page

The other plugins are not that advanced, but, for example, in WP Super Cache you can choose which folders are going to be served trough CDN, which can come in handy.

wpsupercachecdn
WP Super Cache CDN integration

Advanced users shouldn’t have any trouble setting any of these services, but for any questions you might have, you can ask me trough the comments. I’ll share all my knowledge to help you if you get stuck and if no one else can help (“..and if you can find them, maybe you can hire the A-team” ;)).

PS. MaxCDN and KeyCDN, since they are very similar, their documentation is practically the same. Therefore if you don’t know how to do something using one service you can find the solution in the other service provider’s documentation.

Most users can just go with the default cPanel settings and use Cloudflare. KeyCDN/MaxCDN users would go with something more advanced, while Google cloud Storage is not very user friendly (even though I am using it because all of my VPS instances are hosted on GCE).

LEAVE A REPLY

Please enter your comment!
Please enter your name here