开发者 | wmark |
---|---|
更新时间 | 2011年5月25日 20:14 |
PHP版本: | 2.7 及以上 |
WordPress版本: | 3.1.2 |
wp-content
and wp-includes
.
That way static content can be handled by a CDN by origin pull. (The origin is your blog address.)
You could upload your static files to S3, CloudFront or just any site, too.
For S3/Cloudfront, see this script
to help you with uploading/synchronizing your blog files.
This lite
version of the plugin works like the regular version but is not supported.
You can get the regular version at Github, which:
/wp-content/plugins/
directory.Settings
.Either deactivate the plugin or delete the plugin's directory.
As many WP plugins don't correctly include JS and CSS files most of the current CDN plugins cannot rewrite links correctly. They rely on the high-level WP API. This plugin does its rewriting on the lowest level possible - PHP itself.
After your blog pages have been rendered but before sending them to the visitor,
it will rewrite links pointing to wp-content
and wp-includes
. That rewriting will simply
replace your blog URL with that you have entered in settings screen.
Thus files are pulled from the other site.
Yes, by design it is compatible to all plugins. It hooks into a PHP function (ob_start) and there does the string replacement. Therefore, no Wordpress function is altered, overwritten or modified in any way. Indeed, you could even copy this plugin's rewriter into any arbitrary PHP software.
On my own blog, Mark's blog. See the source code of any page.
Yes, if it supports origin pull (aka mirror bucket, some sort of caching). Or if you upload your files manually.
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.
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 off-linker is compatible.
The experts at Arcostream
currently develop (or have it ready by now) a plugin which enables you to set up a CDN at their's
with one click or two. Without any configuration, everything is automatic. Please google their licensed flavour of this plugin. ;-)
If you are using the lite
version, please upgrade.
The following applies only to the regular
version which you can find at Github.
Share it with me! The rarer a species, the more interesting. But I will need its habitat, too.
Therefore, please send me at least one page with the plugin turned off and on, as attachment.
wp-content
and wp-includes
) directories for rewritingstyle=xy:url(...)
CSS attributesfavicon.ico
or apple-touch-icon.png