Delicious Brains

Documentation

Assets Pull Addon

With the Assets Pull addon you can start serving your site’s assets (CSS, JS, fonts, etc) from CloudFront, or another CDN in just a few clicks. The addon contains a setup wizard which will walk you through the process of creating a proper CloudFront distribution for serving your assets using your own domain name.

Setup

Once installed and activated, the addon will prompt you to configure it using the wizard. Simply follow the steps to set up CloudFront, or skip to the settings at any time. The only required setting is the domain to use for the assets. If you followed the setup wizard this will already be configured for you.

Testing the Pull Domain

Once you have your domain configured, you can test the configuration of the domain to make sure that requests are flowing through the domain properly before enabling URL rewriting. This can be rechecked again at anytime simply by updating the value in the setting field (without saving) and clicking the Check again link.

FAQ

How is this plugin different than the old Assets addon?

The primary difference is that the old addon would actively scan for asset files in the filesystem of the WordPress install, and upload these files to Amazon S3. Asset URLs could then be rewritten to use S3 URLs or a custom domain of your choice to use with a CDN.

The Assets Pull addon, does not scan or upload your files at all, nor does it have any background processing. It simply rewrites asset URLs to use your custom CDN domain which “pulls” uncached assets from your site on-demand. This is more efficient with system resources and generally advocates better practices such as using a CDN rather than serving directly from S3.

Can the new addon be installed or active at the same time as the old Assets addon?

Both new and old addons can be installed at the same time, but only one can be active at a time to prevent URL rewriting conflicts. This activation handling is done automatically; activating one will automatically deactivate the other.

**Does the Assets Pull addon support compression, minification, or concatenation?

The old addon offered pre-compressing assets with gzip before uploading to S3, but this is no longer necessary as we walk you through the process of enabling automatic compression in the CloudFront setup wizard. Because Assets Pull primarily rewrites your URLs, it should be compatible with most minification or concatenation (combining) plugins as well.

Which assets will be served from the CDN?

By default, the Assets Pull addon will only rewrite URLs for styles and scripts which are registered through the WordPress enqueue system.

You can also rewrite URLs for any other kind of asset using the get_asset_url filter.