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:
First, create a Pull Zone within your KeyCDN dashboard.
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.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.Now, when creating templates use the
{cdn_url}
variable, for example:{cdn_url}uploads/image.jpg
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:
- HTTP/2 supported edge servers for even faster delivery
- Access to our complete network of POPs
- Low pricing that decreases with volume
- Let's Encrypt SSL support
KeyCDN also offers many other features and advantages to users who implement an ExpressionEngine CDN integration.