CDN Enabler is a lightweight WordPress plugin used to link your assets to the StackPath SecureCDN 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.
To begin, set up a new StackPath Site that will cache static assets only in the StackPath Control Panel. If you need help, follow the article on creating a Site for static content delivery.
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 drop-down menu:
- Before you finish configuring, you need to take the CDN URL from the StackPath Site which was created in the StackPath Control Panel. Log into https://app.stackpath.com and find the CDN URL under Site > CDN > Settings:
- Once you copy the CDN URL from your StackPath Control Panel, go back to the WordPress CDN Enabler settings page and paste that CDN URL into the field called CDN URL:
Please keep in mind that CDN URL 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 CDN URL there:
If by some chance you don't see the CDN URL in the source, there's most likely some caching layer that's preventing you from seeing it. To fix this, please purge any caching layer, including browser cache, prior to checking your page source.
Enabling CORS Headers
Now that you are using a 3rd party domain in your page source, there's a chance you'll receive CORS errors such as these:
To solve this issue, please follow the instructions in the enabling CORS headers article.
Test speed and SEO after SecureCDN is enabled
Compare the before and after tests, and note that it can take one to seven days for your site to realize the performance improvements of a CDN. Both of these test sites also will give you SEO recommendations that you can follow.
Still need help?
In the event that you have problems with the integration, 24/7 integration support is available via live chat. Get in touch with us by clicking the chat bubble at the bottom of the page! We're always happy to help answer questions and to help make sure you experience the fastest and most secure experience with the CDN.