How to use the CDN Enabler our lightweight WordPress plugin used to link your assets to the StackPath CDN.
CDN Enabler is a lightweight WordPress plugin used to link your assets to the StackPath CDN by rewriting the Base_URL variable to the CDN domain. This article will walk you through the process of setting up the CDN Enabler plugin with the StackPath Site.
This article will walk you through how to perform a static assets integration, which does not support the use of the StackPath Web Application Firewall (WAF). If you’re looking to maximize security by using our CDN with the WAF, please refer to the CDN & WAF integration guide.
Before you begin, we highly recommend you test the performance of your site using Google Page Speed or Pingdom Tools. You can test your site now and after setting up the plugin for a before and after performance comparison.
This tutorial assumes you've already gone through the steps to create a StackPath Site.
Configuring CDN Enabler
Log into your WordPress admin dashboard to start the configuration process.
- On the left side, click plugins and then click the Add New button:
- On the right side of the screen, use the search feature to search for CDN Enabler.
- Click Install now. When the installation has completed, the button will transform into an Activate button.
- Click the Activate button:
- Navigate to Settings and select CDN Enabler from dropdown menu:
- Before you finish configuring, you need to take the Edge Address from the StackPath Site which was created in the StackPath Control Panel. Log into the StackPath and find the Edge Address under CDN > Site > Settings.
- Once you copy the Edge Address from your StackPath Control Panel, go back to the WordPress CDN Enabler settings page and paste that Edge Address into the field called CDN URL:
Please keep in mind that the Edge Address needs to be prefixed with HTTP:// or HTTPS:// protocol. Which you are required to use depends on if you are using TLS on your origin. (If you do have TLS, the CDN HTTPS checkbox needs to be enabled as well).
The CDN should now be integrated into your website. You can confirm this by checking your page source (right-click on your web page, then pick Inspect Element—from there, choose Source) and searching for the Edge Address there:
Test the integration
Checking if CDN enabled is really simple.
- Purge the browser cache or use a Private or Incognito window.
- Open the website
- Right-click anywhere on the page
- View source code
- Check the source code for the Edge Address
Test speed and SEO after Stackpath CDN is enabled
At this time, you should perform another speed test by using Google Page Speed and Pingdom Tools.
Compare the before and after tests and note that it can take one to seven days for your site to reflect the performance improvements of a CDN. Both of these test sites also will give you SEO recommendations that you can follow.
Still need help?
We're always happy to help answer questions and to help make sure you experience the fastest and most secure experience with StackPath CDN.