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.