WordPress CDN Integration with CDN Enabler

The WordPress CDN Enabler is a lightweight plugin to quickly and easily integrate KeyCDN into your WordPress site. The WordPress CDN Enabler plugin comes with the ability to set included directories, exclude particular extensions (e.g. .php), and enable / disable relative paths and HTTPS connections. Using a WordPress CDN plugin is the easiest way to integrate any CDN with your WordPress website and have it delivering cached assets via the edge servers in a matter of minutes.

Read more about our full list of WordPress plugins at KeyCDN WordPress Plugins.

WordPress CDN Plugin Integration

The CDN Enabler plugin also runs perfectly with the WordPress Cache Enabler plugin. To install and configure the WordPress CDN Enabler, watch the walk-through video or follow the outlined steps below.

WordPress CDN Enabler Plugin Settings

A lightweight WordPress CDN plugin to link your assets to a Content Delivery Network (CDN).

  1. Create a pull zone in the KeyCDN dashboard.
  2. Install the CDN Enabler plugin (login to your WordPress dashboard: Go to Plugins -> Add new).
  3. Activate the plugin and click on settings.
  4. Enter the CDN URL or Zonealias in the CDN Enabler Settings (you can find the CDN URL in the KeyCDN dashboard):cdn enabler settings oneImportant: The CDN URL needs to start with the protocol http:// or https://.
  5. Save the settings and verify in the HTML code if your assets are loading from the CDN. wordpress cdn enabler html code

In Settings –> General, make sure to use a HTTPS URL if HTTPS is used for the CDN as well. If your blog is located in a certain path (e.g. https://www.yourdomain.com/path/to/blog ) it needs to be updated accordingly as shown in this screen shot:

WordPress URL path

If your Site Address is different from your WordPress Address defined in Settings > General, follow the instructions below.

Some WordPress installations may not be located in the root directory but rather within a sub folder such as the following:

wordpress address sub folder

In this case, the CDN Enabler’s Included Directories settings need to be configured to account for this. The difference in path from the Site Address to the WordPress Address must be prepended to the directories which contain the files you want to be integrated with KeyCDN. In the above example, site is the only difference between both URLs, therefore your CDN Enabler settings should resemble the following.

cdn enabler settings two

Purging KeyCDN Cache from the Dashboard

CDN Enabler also allows you to purge your KeyCDN zone’s cache directly from the dashboard. This means no more having to log into the KeyCDN dashboard to purge the cache whenever need be. To configure this feature simply navigate to CDN Enabler’s plugin settings and add your API Key and Zone ID.

To retrieve your KeyCDN API Key, login to the KeyCDN dashboard and navigate to Account Settings > Authentication. Copy your secret API Key and paste it into CDN Enabler’s settings field. Next, navigate to the Zones tab in your KeyCDN dashboard and copy the Zone ID of the website you are accelerating. Paste this into KeyCDN Zone ID field within the plugin’s settings.

cdn enabler purge cdn

You should now be able to purge that zone’s cache by clicking the Purge CDN button located in the top admin bar.

cdn enabler top admin bar

Why Use a WordPress CDN Plugin Solution?

Integrating a WordPress CDN plugin with your site can help reduce site latency and thus speed up your website for users globally. The average website is comprised of 80% static content, therefore supercharging your website with the help of a CDN not only increases it’s delivery speeds but also helps reduce the load on the origin server. KeyCDN also offers additional benefits such as:

Also make sure to check out our complete guide on how to speed up WordPress for more information on how to further improve your WordPress site’s loading time.