This article will walk you through how to perform a static assets integration, which does not support the use of the StackPath Web Application Firewall (WAF). If you’re looking to maximize security by using our CDN with the WAF, please refer to the CDN & WAF integration guide.
Before you begin setting up your StackPath CDN services with XenForo, we highly recommend you test the performance of your site using Google Page Speed or Pingdom Tools. You can test your site now and after setting up the plugin for a before and after performance comparison.
This tutorial assumes you've already gone through the steps to create a StackPath Site.
Installation
-
Connect to your FTP account.
-
Navigate to folder library
-
Edit file config.php and add below two lines:
$config ['externalDataUrl'] = 'http://something.stackpathcdn.com/data';
$config ['javaScriptUrl'] = '
http://something.stackpathcdn.com/js';
-
Login to your XenForo admin area.
-
Navigate to Style -> General -> Settings.
-
Under field Path to images replace existing content (/styles/default) with the following:
http://something.stackpathcdn.com/styles/default -
Click on Update Style Properties to apply your settings.
-
All Done!
Test if Stackpath CDN is integrated correctly
Checking if CDN enabled is really simple.
- Purge the browser cache or use a Private or Incognito window.
- Open the website
- Right click anywhere on the page
- View source code
- Check the source code for the Edge Address