According to the WP CDN Rewrite WordPress page, “this plugin allows you to rewrite the root url of assets, css, and js files. This allows you to load these resources from an external URL and improve page load times by taking advantage of parallel browser requests.”

How to Install and Setup WP CDN Rewrite

  1. Log into your WordPress admin panel.
  2. Hover your mouse over “Plugins” and click “Add New.”
  3. In the “Search” box, type “WP CDN Rewrite” and click “Search Plugins.”
  4. Click “Install Now.” A prompt dialog will open and ask if you are sure you want to install the plugin. Click “OK”, then after the plugin is installed, click “Activate Plugin.”
  5. Navigate to Settings –> Rewrite.
  6. Paste the CDN URL into the field called CDN URL WITH http:// included and without a trailing slash.
  7. The CDN Root URL for CSS Files and CDN Root URL for JS Files fields are optional and can be used for parallelizing downloads across hostnames. In order for you to use these you’ll need to create a couple of custom domains within your DNS settings.
  8. NOTE

    To ensure you implemented MaxCDN correctly, you can view the source code of any page to confirm that the CDN domain is being used for static assets instead of your origin domain. You can also use tools like pingdom, gtmetrix, webpagetest that can give you more detailed reports on your CDN implementation status.

    ​if you have any questions about using this plugin effectively, please leave a comment below.

    • Matija

      Seems very interesting. Would this work with wp rocket plugin, which I set up with 3 extra cname subdomains. Like this:

      (Dakle, kad bi postavio i wp rocket i WordPress CDN Rewrite na taj način da skupa rade, jel bi bilo kakvih dodatnih beneficija?)

      • Ivan Dabic

        Hey Matija,

        So, to remember what CDN plugins do, they are rewriting urls for static assets so that your links reference CDN domain instead ( -> With multiple plugins doing the same thing you are looking at more resource usage rather than performance benefit 🙂 That is if you don’t have a plan for this kind of setup 🙂

        Plan is to separate file types or file groups per plugin and thus, one plugin serves one group of files and leaves the rest for another plugin.

        This is needless because benefit doesn’t exist (unless you manage to utilize parallelized download with multiple plugins).

        Now, parallel download you can take advantage with multiple CNAME’s easily with one plugin capable of shifting CNAME’s through your source code.

        So, to answer your question shortly: You shouldn’t be using multiple plugins but, one plugin that supports domain sharding ( and multiple CNAME’s to actually utilize sharding.

        I hope this helps. If not, write us back on so we can take the discussing further 🙂

        • Matija

          Yes, I see they do similar things, but.. wp rocket is a caching plugin and has only 3 type of files which we can assign to cname subdomains (css, javascript and images).
          Using WordPress CDN Rewrite plugin maybe we can use to assign more file types like .epub .pdf etc. to another subdomains?

          That was acctually what I was thinking, would those two plugin being able to work together?
          I did not try wp cdn rewrite on my site, I figured you could have the answer for me to save me some time in future 🙂

          Also, should I be in this case gonna have to make more pull zones? All cname subdomains can easily go trough 1 pullzone. But as there would be 2 plugins…. or maybe it is just enough to make more cname sundomains? :=)

          • Ivan Dabic

            So, CDN Rewrite can’t be a good play mate for parallel dowload but, you can assign custom file types to it. So, if parallelizing downloads takes higher priority for you I’d say go by CDN Linker or W3TC.

            Although, keep in mind that CDN Linker can do only CDN and can’t do caching so, it’s for the best to use it in combination with caching plugin like W3TC (w3tc without cdn functionality).

            In any case, using two plugins can be done as long as you separate functions between these two.

            To answer “would those two plugin being able to work together?” -> They can as long as you keep the caching on WP Rocket and CDN on CDN Rewrite.

            One zone is enough, even, it’s recommended to use single zone because as more zones you have more time is needed to cache your files and more effort to manage more zones unnecessarily.

    • SHILA

      I tried to activate that plugin but it showing this message-“Plugin could not be activated because it triggered a fatal error. Warning: require_once(__DIR__/composer/autoload_real.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/44/8815844/html/westpalmbailbonds/wp-content/plugins/wp-cdn-rewrite/vendor/autoload.php on line 5

      What should I do now?