Support

Find answers, guides, and tutorials to supercharge your content delivery.

SilverStripe CDN Integration

Updated on October 4, 2018
SilverStripe CDN Integration

SilverStripe is an open source CMS that prides itself on being easy to use, very extensible, and secure. The CMS was designed to cater to a variety of individuals including developers, marketers, authors, and IT managers. The SilverStripe CMS powers the websites of some very well known brands including:

  • Forbes,
  • Lenovo,
  • Westpac, and more

However, regardless of how to easy to use or flexible a CMS is, performance is one major factor that can almost always be improved upon. That’s why in this guide we’re going to demonstrate how SilverStripe users can implement a SilverStripe CDN integration to further accelerate the delivery of their static assets.

SilverStripe CDN Integration

The following SilverStripe CDN integration guide requires you are using version 3.1.x of either the SilverStripe framework or CMS. Follow each step below to complete the integrate and have your SilverStripe running faster for users globally.

  1. Before starting the integration process, create a Pull Zone in your KeyCDN dashboard.
  2. Install the silverstripe_cdnrewrite module manually or by running the following Composer command.

    composer require wernerkrauss/cdnrewrite dev-master
    
  3. Open your config.yml file and enable the CDNRewriteRequestFilter filter manually by setting the CDNRewriteRequestFilter.cdn_rewrite and CDNRewriteRequestFilter.cdn_domain config variables.

  4. Your config.yml file should look similar to the following:

    CDNRewriteRequestFilter:
        cdn_rewrite: true #global switch
        cdn_domain: 'https://cdn.yourwebsite.com'
        rewrite_assets: true #rewrite stuff in assets
        rewrite_themes: false #do not rewrite stuff in themes folder
    
  5. Be sure to define the proper protocol and Zone URL or custom CDN domain for the cdn_domain variable.

  6. Save your config.yml file and check the page source for your site to ensure that your static assets have been properly rewritten to use the CDN URL.

That’s it! Now you can automatically start accelerating your SilverStripe’s static assets using a content delivery network.

Benefits of Using a SilverStripe CDN Setup

Now that your SilverStripe CDN integration is complete, you’ll be able to start delivering cache content to your users thus improving performance and user retention. There also exist many other benefits to users who accelerate their SilverStripe sites with KeyCDN including

  • Access to our complete network of POPs for greater global availability and speed
  • A CDN that supports Brotli compression for better results and smaller file sizes
  • HTTP/2 support for reduced latency and optimized content delivery
  • Free Let’s Encrypt SSL certificates for a safer and faster website

Check out KeyCDN’s full list of features to learn more about the advantages SilverStripe users experience when integrating their site with KeyCDN.

Supercharge your content delivery 🚀

Try KeyCDN with a free 30 day trial, no credit card required.

Get started