In some cases, even after configuring the ClearFront CDN plugin in WordPress, some or even all of the URLs for the static resources may not come from ClearFront CDN. In this guide, we will look into the most common reasons why this happens and how to solve them.

Page Caching

If your WordPress is configured with a static page caching plugin, it might be holding an older version of the pages in cache before the CDN plugin has been activated. After activating the plugin for the first time, we suggest purging the cache of any caching plugins to ensure that the new URLs are set. Common plugin examples include Litespeed Cache and WP Fastest Cache, these create a server-layer cache that can interfere with CDN integration changes.

This can also apply to various static caching configured by the web hosting itself. If you are aware your web hosting is actively caching pages, make sure to purge that as well.

Conflicting CDN Integration Plugin

Many cache plugins can include CDN configuration; which can lead to a conflict within Wordpress (for example when ClearFront CDN Plugin is enabled and WP Rocket CDN integration is enabled, but assets to integrate on the CDN vary between the two causing unexpected behavior). There should always be only one CDN-based option enabled.

Incorrect URL Detection

Our plugin works by detecting the URL of your WordPress page based on the settings inside of WordPress itself. In case no URLs are detected, we suggest checking that the URL in the Advanced Settings of the plugin matches the actual URL of your website where the files are served.

CSS/JavaScript Files

Some of the static resources are loaded out of CSS files or dynamically by JavaScript. ClearFront CDN cannot modify those files to replace the URLs. In these cases, we suggest checking the CSS files or JavaScript scripts for any direct URLs that point away from the CDN.

Dynamically Generated Scripts or Lazy Loading

On some occasions, we noticed that some WordPress plugins might load images dynamically from a script that is generated on the fly. In those cases, our plugin cannot access the URLs as they are usually encoded within JavaScript. If this is the case, we suggest checking with the plugins themselves if they offer configuration for the CDN or directly specify which URLs to load in order to force them to use the CDN version.

HTTP/2 Push

Your server might be configured to automatically push the resources to the browser, even without the browser requesting those. In this case, you will need to configure your server to disable HTTP/2 Push for requests that are already served from the CDN

Was this answer helpful? 0 Users Found This Useful (0 Votes)