WP Rocket with KeyCDN Set UP: 9 Easy Steps

Last Updated on December 28, 2022 by Steve

A good caching solution along with the use of a CDN can significantly increase the speed of your website. WP Rocket and KeyCDN make a fine combination and are a recommended solution at Best WP. The following tutorial will help install and configure both.

What is a CDN anyway?

Content delivery networks (CDN) are the transparent backbone of the Internet in charge of content delivery. Whether we know it or not, every one of us interacts with CDNs on a daily basis; when reading articles on news sites, shopping online, watching YouTube videos or perusing social media feeds.

No matter what you do, or what type of content you consume, chances are that you’ll find CDNs behind every character of text, every image pixel and every movie frame that gets delivered to your PC and mobile browser.

To understand why CDNs are so widely used, you first need to recognize the issue they’re designed to solve. Known as latency, it’s the annoying delay that occurs from the moment you request to load a web page to the moment its content actually appears onscreen.

That delay interval is affected by a number of factors, many being specific to a given web page. In all cases however, the delay duration is impacted by the physical distance between you and that website’s hosting server.

A CDN’s mission is to virtually shorten that physical distance, the goal being to improve site rendering speed and performance.

CDN Diagram

WP Rocket is a caching and performance optimization plugin to improve the loading speed of WordPress websites. You can install and configure WP Rocket in less than 3 minutes!

Setup Caching Using WP Rocket and KeyCDN

Step 1: First up, we need to get an account setup with KeyCDN. At the time of this writing they do offer a free trial to get users started. After signing up and activating through email, click through to Zones.

Keycdn Zones Tab

Step 2: Then click + New Zone.

Keycdn Select Create New Zone

Step 3: Now we will setup a Pull Zone within KeyCDN. Add a Zone Name (“cdn” used in this example)

Steps 4 & 5: Add your Origin URL, which is your homepage. Click Save.

Keycdn Select Add New Zone

Step 6: We now need to wait for about 5 minutes for the Zone to be setup. Once you see the Status change to Active, we’re ready to head into WordPress.

Keycdn Zone Management Page

Before making any changes to your site’s settings, make sure you have a fully working backup of your site and database. If something goes wrong, you will want to have a restore point!

Step 7: With the Zone now setup in KeyCDN, we head into WordPress and go to the WP Rocket settings and click on CDN. First up, tick Enable Content Delivery Network.

Step 8: Add the Zone URL from KeyCDN.

Step 9: Then click Save Changes. When you try to load your site, it may initially have blank images and look all messed up. I found that after waiting for around 5-10 minutes, everything cleared up and the site loaded normally again.

WP Rocket CDN Page

Then WP-Rocket will replace all your file URLs (images, CSS and JS) with the newly updated host name URL.

However, if you have any hard coded links in your template files, style sheets or in a custom field you will need to update them manually.

Conclusion WP Rocket with Keycdn

And there you have it! A WordPress website optimized with KeyCDN and WP Rocket ready to welcome visitors from around the world.  WP Rocket also works quite well with StackPath CDN. We have a full tutorial on setting up StackPath and another tutorial on integrating StackPath with WP Rocket.

Hope you found this article helpful.

Author

  • Steve

    I have been in the information technology field since I left the United States Army over twenty years ago. Skills and experience include a Bachelor's degree in Computer Information Systems with a Specialization in Databases and a Master's in Computer Information Systems Management.

    I fell in love with WordPress over 10 years ago and spend most of my time designing, building and administering WordPress based sites. I am fluent in multiple programming languages including Python, PHP, SQL, Java and C#.

Leave a Comment

%d bloggers like this: