XenForo CDN Integration
This tutorial shows how to complete a XenForo CDN integration with KeyCDN.
- Create a Pull Zone before you start with the XenForo CDN integration.
- Navigate to the document root of your XenForo installation. We recommend to use your FTP account.
Add the following code to the file library/config.php using your own CDN URL such as http://yourzone-ab12.kxcdn.com
Log in to your XenForo control panel and navigate to “Appearance” → “Styles” → [Your Style] → “Style Property Groups” → “General” → “Settings.”
In the field “Path to Images” replace default “styles/default” with “http://yourzone-ab12.kxcdn.com/styles/default” and click on the “Update Style Properties” button to apply your new settings.
Up one directory, navigate to “Header and Navigation” → “Settings.”
Confirm that the “Header Logo Image Path” is using the
@imagePathcommand. If you hard code the complete URL your logo will not serve correctly from the CDN.
That’s it. Check the HTML in order to make sure the URLs have been rewritten properly.
Important: When using avatars in Xenforo, the feature Ignore Query String needs to be disabled. It’s recommended to purge the whole Zone after this Zone change.
Also make sure to check out our additional recommendations on how to speed up Xenforo.