Craft CDN Integration
Updated on October 4, 2018
This tutorial helps you to integrate KeyCDN into your Craft CMS installation.
- Create a Pull Zone before you start the Craft CDN integration.
- Log in to your Craft control panel.
- Navigate to Assets.
- Create a new Source and define a name, file system path (e.g.
assets/
) and the URL (e.g.http://<zonename>-<hexid>.kxcdn.com/path/to/your/assets
). - Create the directory in your public directory according to the file system path that you have defined before and make sure it has write and read permissions.
- Upload your images to the defined asset source and integrate them in your entries wherever you want.
- Verify if the assets are loading from KeyCDN.
If you already have your assets defined just replace the current URL with the Zone URL from the KeyCDN dashboard.
Furthermore, to automatically clear the KeyCDN cache for a particular asset once it has been updated/deleted or purge the entire Zone directly from the control panel, you can make use of the KeyCDN Craft plugin available on GitHub.