WP CDN Rewrite is a WordPress plugin that rewrites the root URL of static assets including images, CSS files, and JavaScript files. It replaces the root URL (yourdomain.com) with the CDN URL (site.company.stackpathdns.com). Doing this ensure static assets are delivered by StackPath CDN rather than the origin server.
This tutorial assumes a site is created.
Installation
-
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 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.
Configuration
-
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 scheme ( http:// or https:// ) in front of the CDN URL. -
Click Save Changes.
-
Verify StackPath CDN is properly integrated.