ProCache CDN Integration

Using ProCache with a CDN can drastically reduce the server’s overhead and bandwidth in delivering assets, while also greatly improving the speed at which they are delivered to end-users.

What is the benefit of using a CDN with ProcessWire?

By using the CDN feature provided with ProCache on your ProcessWire site, you can drastically reduce the server's overhead and bandwidth in delivering assets, while also greatly improving the speed at which they are delivered to end-users. This is because most CDN providers have multiple regional locations, and automatically select the one closest to the person visiting your site. The result is that your site loads more quickly than it otherwise might without the CDN.

Using a CDN also means that you are much better prepared for traffic spikes, as your server can focus purely on delivering the HTML while all the high bandwidth assets can be delivered by the CDN. Combined with ProCache's static caching features, you have an unbeatable performance combination. Using ProCache and a CDN enables you to do a lot more with less, especially in terms of server resources. It is very likely you will find better performance with this combination than you would in paying for a faster server or more resources at your hosting facility.

What is an "origin pull" CDN?

"Origin" implies your server (or a location on your server), and "pull" implies automatically pulling a file from your server.

ProCache can be integrated with any CDN that supports origin pull. This may also be referred to as "pull zone", "pull mode" or just "pull". Origin pull implies that you configure the CDN service to mirror a path on your server (origin), so that accessing the same path on the CDN returns the same file that it would on the origin server. When the CDN doesn't have the requested file present, it pulls it from your origin server and then caches it so that it doesn't need to re-pull it for future requests to the same file.

The origin can be any URL on your server that has assets beneath it. For example, with ProcessWire, the most common pull origin would be the /site/ directory on your server. This is because all of your site's files managed by ProcessWire live under /site/assets/, and all CSS/JS files typically live under /site/templates/. The origin could also be the entire server "/".

With ProCache, we recommend using /site/ as your pull origin since ProCache uses a CDN to offload your site's assets, while letting your server focus on delivering the HTML. The origin is configured both in ProCache settings and at your CDN provider.

What CDN providers support origin pull?

Almost all CDN providers support origin pull. Examples you may have heard of include Amazon CloudFront, KeyCDN, MaxCDN, Akamai, CDNetworks and more. We use Amazon Cloudfront on and so our configuration examples focus on that provider.

Configuring a CDN with ProCache

Our instructions focus on configuring Amazon CloudFront with ProCache. However, the process should be very similar for any CDN provider. CloudFront is an easy one to get started with since their entry level CDN is free (that's the one we are using on this site).

  1. Obtain an account with the CDN provider (Sign-up page for Amazon Cloudfront).

  2. On the AWS Web Services page, click to: Storage and Content Delivery > CloudFront. This takes you to the "Cloudfront Distributions" page.

  3. Click the "Create Distribution" button, and then click the "Get Started" button for "Web".

  4. You will now be on the "Create Distribution" page. To get things started, we recommend accepting all the default settings already selected. However, you will want to populate these two at the top:

    • Origin Domain Name:

    • Origin Path: /site/

    • In addition, if you are using HTTPS you will likely want the “Origin protocol policy” setting set to “Match viewer”.

  5. After creating your distribution, you will come back to the Cloudfront Distributions page. You should now have a row for your newly created CDN distribution. Note the "Domain Name" column in the table, which will look something like Copy or write it down, as you will be pasting it into your ProCache settings next, where we mention

  6. Login to your ProcessWire site, go to Setup > ProCache, and click the CDN tab. We recommend the following settings:

    • CDN status: "Enabled for all users" (or you may wish to temporarily use "Enabled for logged-in users" for testing on a production site).

    • CDN host setup: /site/ =

    • CDN file extensions: css js jpg jpeg gif png pdf (default value, or blank for all)

    • CDN attributes: href src srcset

    • CDN template files: None (or you may wish to check one or two templates temporarily for testing)

Assuming your CloudFront CDN is now deployed (it can take 10-20 minutes), you are ready to test to see how the CDN is working. View a page on the front-end of your site where your CDN would be in use. View the source or use your browser inspection tool to examine the URLs for any assets using file extensions you configured in ProCache. For example, your site's CSS file(s) should now point to: //

If all looks good and appears to be working then your site's assets are now powered by the CDN! At this point you may want to clear your ProCache cache and/or configure your minification and merge settings under the "Minify" tab.

Twitter updates

  • ProcessWire 3.0.153 (dev) focuses on comments field updates, significant refactoring/improvements to ProcessWire’s core Template class and PagesLoader class (which is used by the pages API variable), and we introduce a useful new pages API method— More
    20 March 2020
  • ProcessWire 3.0.152 core updates— This week we have some major improvements to our core date/time Inputfield, as well as a new ability to specify your own custom classes for Page objects— More
    6 March 2020
  • This week we’ve got a couple of really useful API-side improvements to the core in 3.0.151, including predefined image settings and static language translation improvements— More
    21 February 2020

Latest news

  • ProcessWire Weekly #307
    In the 307th issue of ProcessWire Weekly we're going to check out the latest dev branch updates, introduce some new third party modules, and more. Read on! / 28 March 2020
  • ProcessWire 3.0.153 core updates
    This latest version of the core on the dev branch focuses on comments field updates, significant refactoring/improvements to ProcessWire’s core Template class and PagesLoader class (which is used by the $pages API variable), and we introduce a useful new $pages API method.
    Blog / 20 March 2020
  • Subscribe to weekly ProcessWire news

“Indeed, if ProcessWire can be considered as a CMS in its own right, it also offers all the advantages of a CMF (Content Management Framework). Unlike other solutions, the programmer is not forced to follow the proposed model and can integrate his/her ways of doing things.” —Guy Verville, Spiria Digital Inc.