This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

WordPress CDN Rewrite


For performance reasons, some websites host static content (images, CSS files, Javascript files, etc.) on something other than the main webserver. It could be as simple as separate, higher performance software running on the same server or a full-fledged CDN serving the files from multiple servers around the world.

While many plugins like this already exist for WordPress, we couldn’t find any that matched our needs. Furthermore, most required running a caching plugin in addition to the CDN plugin. In many cases, that’s fine, but we don’t always want to have caching.

The following are rewritten if a rule matches:

  1. Values in href attributes of A tags
  2. Values in href attributes of LINK tags
  3. Values in src attributes of IMG tags
  4. Values in src attributes of SCRIPT tags


The plugin creates a new section in the Settings area of the
WordPress admin site titled ‘WP CDN Rewrite’. All configuration is
performed there.

First, add domains to the whitelist. URLs on these domains will be
rewritten if a rule is found for the given URL.

Second, add rules. Two types of rules can be specified:

  1. Host rewrite

    These rules only change the host on a given URL. For cases along
    the lines of the CloudFiles use case that we wrote this for, simply
    specify the new host and the extension to match on (e.g., jpg).

  2. Full rewrite

    These rewrite everything except the filename in the URL. Specify
    whatever should prefix the filename (e.g.,


  • Configuration


  1. Extract wpcdnrewrite into the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress



No questions yet.


Very good plugin

I still did not try it, but this is super plugin. Do not see why is not used often, maybe people do not understand.

I’ll give feedback in few days. I belive this can be used with cdn to speed up things even fruther.

Read all 1 review

Contributors & Developers

“WordPress CDN Rewrite” is open source software. The following people have contributed to this plugin.




  • Initial release