• Stars
    star
    176
  • Rank 216,987 (Top 5 %)
  • Language
    PHP
  • Created over 13 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

šŸš€ Rewrites links to static files so they point to the CDN of your choice. For Wordpress.

CDN Linker for Wordpress and Magento

https://coveralls.io/repos/wmark/CDN-Linker/badge.svg?branch=master
Info
See github for the latest source.
Author
Mark Kubacki <[email protected]>
License
RPL v1.5, for non-commercial Personal Use (Ā§ 1.11)
Tags
CDN,links,cloudfront,simplecdn,media,performance,distribution,accelerator,content,speed,cloud
Requirements
Wordpress 2.7 ā€“ 5.5 and later, PHP ā‰„5.6 or HHVM ā‰„ .3.0

Rewrites links to static files to your own CDN network.

Description

Modifies links pointing to ā€˜wp-contentā€™ and/or ā€˜wp-includesā€™ (or whatever you configure) by replacing your ā€˜blog_urlā€™ with a custom one. Enables you to pull static files, such as images, CSS or JS, from a different host, mirror or CDN.

You could upload your files to S3, CloudFront or a host dedicated to serving static files.

License

Licensed under the Reciprocal Public License, Version 1.5, for Personal Use as defined in 1.11 therein (http://www.opensource.org/licenses/rpl1.5).

Else, please contact me by email for an individual license. I will need the number of sites and servers you are running to make you an offer (which is a tip of 10 to 20 EUR in most cases).

Installation

  1. Setup your CDN: Either configure ā€œorigin pullā€, ā€œmirror bucketā€ or upload your static files to a dedicated host.
  2. Upload the plugin to your /wp-content/plugins/ directory.
  3. Activate the plugin through the ā€˜Pluginsā€™ menu in WordPress.
  4. Provide the URL, where your static files can be found, under ā€˜Settingsā€™.

Support

Before asking for support please upgrade to the latest non-beta version of CDN Linker!

  • I will happily discuss your feature requests and ideas for further development if you send me an email.
  • Please understand that individual support is not free of charge. Attach to your initial email a list of all installed plugins, and the two HTML files (just text, no images) you receive when running with and without CDN Linker being enabled. Please remember to mention the URL to your site as well as your license number or Paypal transaction ID, if you have it.
  • The cause of empty pages is, in all cases as of now, a different caching plugin which already does rewriting of links.

Frequently Asked Questions

Is it any good?
Yes.
Is it free of charge to use?

Yes, for personal use. Not for commercial use or hosting companies.

ā€˜Personal useā€™ excludes any commercial or commercialized sites or blogs. Although ā€˜personal useā€™ excludes hosting companies you are free to upload the plugin to your WP installation individually, though, as long as your ā€œWP installationā€ is covered by the term ā€˜personal useā€™. ;-)

You can obtain a generous license for other use-cases for a tip. By ā€˜generousā€™ I mean that one license will cover all domains serving the same content no matter which TLD (myblog.com, myblog.de, myblog.us ā€” all covered) and the such. Contact me by email with a list of the relevant domain names.

Contributors will receive a gratis license.

How do I uninstall it?
Go to Wordpress' plugin listing and click on ā€œdeleteā€.
Will it work with my CDN?
Yes, if it supports ā€œorigin pullā€ (aka ā€œmirror bucketā€, some sort of caching). Or if you upload your files manually.
What about Amazonā€™s S3?

Right, S3 doesnā€™t support ā€œorigin pullā€. You will have to upload your files by hand. Iā€™ve written a script for this, too, so it is just a matter of running it. It is linked on the bottom of my blog post about copying files to S3.

Amazonā€™s CloudFront does support origin pull. Just create a ā€œdistributionā€ as usual and set your blogā€™s URL as ā€œoriginā€.

So, my blog is fully served by a CDN?
No. Wordpress will still have to run on the original host. ā€œwww.myblog.blogā€ will still have to be ā€œwww.myblog.blogā€, only your (for example) images will be loaded from ā€œcdn.myblog.blogā€. Most CDNs do not support fast-changing content or passthrough of HTTP POST requests (ā†’ comments).
There is more than one ā€œCDN Linkerā€?
Yes. This is the regular version. A ā€œprofessionalā€ version exists, too, and is available to paying customers. And there are forks for CDN providers.
What other plugins do you recommend?
Now that you can offload all the files such as images, music or CSS, you should serve your blog posts as static files to decrease load on your server. I recommend SuperCache-Plus as it will maintain, update and create that static files from dynamic content for you. The CDN Linker is compatible.

Troubleshooting

Disqus
Either uncheck rewrite root-relative refs or add count.js and embed.js to exclude if substring.
HHVM
For CDN Linkerā€™s post-processing feature you will have to install hhvm-zmq (monitor issue 1214) or resort to Redis.