This article will walk you through the most simple Static Assets Integration. To get the most out of StackPath (WAF and DDoS protection) you will need to use a Full Site Integration
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 CDN Site.
The plugin replaces your root URL (yourdomain.com) with the CDN URL (site.company.stackpathdns.com). This ensures static assets are delivered by the StackPath CDN rather than your origin server.
This tutorial assumes a site is created.
Log in to the WordPress admin panel:
On the left-hand sidebar, hover over Plugins and select Add New:
In the plugin search box, type CDN Rewrite. Then press Enter on your keyboard:
The WP CDN Rewrite plugin will appear:
Click Install Now.
After WP CDN Rewrite is installed, click the Activate Plugin link located below the CDN Rewrite listing on your Installed Plugins page.
Hover over Settings in the left-hand menu and click CDN Rewrite:
Enter your CDN URL or custom CDN URL in the text field next to CDN Root URL (required).
Make sure to include the correct protocol ( http:// or https:// ) in front of the CDN URL.
Click Save Changes.
Check 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 CDN URL
Test Speed and SEO after the Stackpath CDN is enabled
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.
Feel free to take a look at these articles for some possible next steps with your CDN Integration:
In the event you have problems with the integration, we have 24/7 integration assistance via live chat by clicking our chat bubble at the bottom of this page! We are always happy to help answer questions and to help make sure you experience the fastest and most secure experience with Stackpath CDN.