You are viewing the legacy StackPath SecureCDN Help Center. Please use if you signed up after July 1, 2018 or log in through

StackPath Support

WordPress with WP CDN Rewrite: StackPath CDN Setup Guide

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 ( with the CDN URL ( Doing this ensure static assets are delivered by StackPath CDN rather than the origin server.

This tutorial assumes a site is created.


  1. Log in to the WordPress admin panel:

  2. On the left-hand sidebar, hover over Plugins and select Add New:

    Wordpress plugins panel

  3. In the plugin search box, type  Then press Enter on your keyboard:

    WordPress search box

    The WP CDN Rewrite plugin will appear:

    WP CDN Rewrite plugin

  4. Click Install Now.

  5. After WP CDN Rewrite is installed, click the Activate Plugin link.


  1. Hover over Settings in the left-hand menu and click CDN Rewrite:

    WordPress settings menu

  2. 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.


  3. Click Save Changes.

  4. Verify StackPath CDN is properly integrated.

Return to top