Support

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

ExpressionEngine CDN

Updated on December 20, 2021
ExpressionEngine CDN

ExpressionEngine is a content management system (CMS) developed by EllisLab. It includes a wide range of features and be used for a variety of purposes including ecommerce, blogging, etc. This integration guide will walk through step by step how to use an ExpressEngine CDN setup.

How to complete an ExpressionEngine CDN integration

Having a fast loading website is beneficial for a variety of reasons. Follow the steps below to supercharge your ExpressEngine site:

  1. First, create a Pull Zone within your KeyCDN dashboard.

  2. Next, open the index.php file located in your root folder. We are going to create a global variable to be used when calling any static resources from within the ExpressionEngine templates.

  3. Search for the following snippet:

    // $assign_to_config['global_vars'] = array(); // This array must be associative
    

    Uncomment the above snippet and modify it to resemble the following:

    $assign_to_config['global_vars'] = array('cdn_url' => 'http://ee-hexid.kxcdn.com/');
    

    Replace http://ee-hexid.kxcdn.com with your Zone URL or Zone Alias.

  4. Now, when creating templates use the {cdn_url} variable, for example: {cdn_url}uploads/image.jpg

  5. Check your HTML page source to ensure that your assets are in fact using the CDN URL.

Benefits of using an ExpressionEngine CDN setup

Now that your ExpressionEngine CDN integration is done, your website will receive a boost in performance and a reduction in latency. Many additional benefits also exist to users who accelerate their ExpressionEngine project with KeyCDN:

KeyCDN also offers many other features and advantages to users who implement an ExpressionEngine CDN integration.

Supercharge your content delivery 🚀

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

Get started
KeyCDN uses cookies to make its website easier to use. Learn more