Troubleshooting CDN Issues in Breeze WordPress Cache Plugin
Content
Using a Content Delivery Network (CDN) with the Breeze cache plugin can significantly boost your site's performance. However, configuration issues can sometimes prevent it from working as expected. This guide covers the most common CDN-related problems and their solutions, based on community reports and resolutions.
Common CDN Issues and How to Fix Them
1. CDN URL Protocol is Changed to // on Save
The Problem: You enter a full CDN URL like https://cdn.example.com, but the plugin saves it as //cdn.example.com. This can break absolute URLs for social media meta tags.
The Solution: This was a known bug that was resolved in Breeze version 1.1.7. The first step is to ensure your plugin is updated to the latest version. If you are unable to update immediately, the fix involved a code change within the plugin files, which is not recommended for most users. Updating is the safest and most effective solution.
2. Specific File Types Not Being Served by CDN
The Problem: You've added a file extension like .ttf to the CDN exclusion list, but font files are still being served from the CDN link, potentially causing CORS errors when logged into WordPress.
The Solution:
- Check Exclusions Format: The 'CDN Exclude Content' field is sensitive to spaces. A list like
.php, .svg(with a space) may not work. Instead, use.php,.svg(without spaces). The Breeze team has acknowledged this suggestion for a future update. - Configure CORS Headers: For font files (
.ttf,.woff, etc.) served from a CDN, you must configure your CDN to send the appropriate CORS header. You need to addAccess-Control-Allow-Origin: *or a more specific origin to the headers for these font files. This configuration is done on your CDN provider's platform (e.g., Amazon CloudFront), not within WordPress.
3. CDN Not Rewriting URLs for WordPress in a Subdirectory
The Problem: If your WordPress installation is in a subdirectory (e.g., example.com/folder1-wp/), the CDN URL rewriting might not work correctly, and assets continue to load from your origin server.
The Solution: This is often caused by a conflict with the .htaccess file at the root of your domain. The Breeze team has indicated that a rule in the root .htaccess file may be interfering with the rules Breeze writes in the WordPress directory's .htaccess file. You may need to manually review and merge the rewrite rules.
4. Logout and Admin URLs Changed to CDN Link
The Problem: After enabling the CDN, crucial WordPress URLs like the logout or wp-admin links are rewritten to use the CDN domain, which will break their functionality.
The Solution: This is almost always intentional behavior. The wp-admin area and critical functions like logging out should never be cached or served through a CDN. The plugin should automatically handle this, but if it doesn't, you must ensure these paths are excluded. A common practice is to add wp-admin and any other sensitive pages to your CDN's exclusion list or within Breeze's exclusion settings if available.
5. General Configuration for Amazon CloudFront and Other CDNs
The Problem: CDN integration doesn't seem to work, or some WooCommerce files are not loading from the CDN.
The Solution: For a CDN like Amazon CloudFront, follow these configuration steps within Breeze:
- CDN Root URL: If your site uses both HTTP and HTTPS, use the protocol-relative format:
//xxxxxxxxxx.cloudfront.net. For sites forced to use HTTPS,https://xxxxxxxxxx.cloudfront.netis also acceptable. - CDN Content: In the text field, specify the directories you want to be served by the CDN. The standard directories are
wp-includes,wp-content(again, mind the lack of spaces). - Exclusions: For WooCommerce, you may need to exclude dynamic pages like the cart and checkout. Excluding the
wp-admindirectory is also critical.
While Breeze is generally compatible with most CDNs, including Digital Ocean Spaces, specific configuration might be needed on the CDN provider's side, such as properly setting origin paths and headers.
Verifying Your CDN is Working
After configuring Breeze with your CDN, always verify it's working correctly:
- Visit your website in a browser.
- Right-click and select View Page Source.
- Look for URLs in the code (e.g., for images, CSS, or JS files). They should now point to your CDN domain (e.g.,
https://cdn.yoursite.com/wp-content/.../image.jpg) instead of your main site domain. - You can also use tools like GTmetrix or Pingdom to see where your assets are being loaded from.
By following these troubleshooting steps, you can resolve the most frequent issues that prevent the Breeze CDN integration from working smoothly and ensure your site benefits from faster global asset delivery.
Related Support Threads Support
-
INFINITE SCROLLINGhttps://wordpress.org/support/topic/infinite-scrolling-18/
-
Image on webp formathttps://wordpress.org/support/topic/image-on-webp-format/
-
Mixed Content errorhttps://wordpress.org/support/topic/mixed-content-error-7/
-
Doesn’t works on a homepagehttps://wordpress.org/support/topic/doesnt-works-on-a-homepage/
-
logout URL changed when using CDNhttps://wordpress.org/support/topic/logout-url-changed-when-using-cdn/
-
Some Images are not using CDNhttps://wordpress.org/support/topic/some-images-are-not-using-cdn/
-
Can’t enter »https://«, always changed to »//«https://wordpress.org/support/topic/cant-enter-https-always-changed-to/
-
Issue with preload links featurehttps://wordpress.org/support/topic/issue-with-preload-links-feature/
-
Page cache does not seem to workhttps://wordpress.org/support/topic/page-cache-does-not-seem-to-work/
-
Is it compatible with Amazon CloudFront?https://wordpress.org/support/topic/is-it-compatible-with-amazon-cloudfront/
-
Gravityscan problemhttps://wordpress.org/support/topic/gravityscan-problem/
-
What URL to use for “JS Files With Deferred Loading”?https://wordpress.org/support/topic/what-url-to-use-for-js-files-with-deferred-loading/
-
CDN rewrite doesn’t work when WordPress lives in non-roothttps://wordpress.org/support/topic/cdn-rewrite-doesnt-work-when-wordpress-lives-in-non-root/
-
conplict with Yasr – Yet Another Stars Ratinghttps://wordpress.org/support/topic/conplict-with-yasr-yet-another-stars-rating/
-
To good to be truehttps://wordpress.org/support/topic/to-good-to-be-true-6/
-
CORS Problem CloudFronthttps://wordpress.org/support/topic/cors-problem-cloudfront/
-
Remove stupid sidebarhttps://wordpress.org/support/topic/remove-stupid-sidebar/
-
setting dashboardhttps://wordpress.org/support/topic/setting-dashboard/
-
Defer google tag managerhttps://wordpress.org/support/topic/defer-google-tag-manager-2/
-
Stop google analytics when cache systme is on !!https://wordpress.org/support/topic/stop-google-analytics-when-cache-systme-is-on/
-
Conflict with W3Counter?https://wordpress.org/support/topic/conflict-with-w3counter/
-
CDN Exclude Content trim spaceshttps://wordpress.org/support/topic/cdn-exclude-content-trim-spaces/
-
Unused CSS and JShttps://wordpress.org/support/topic/unused-css-and-js/
-
Add expires headers not workinghttps://wordpress.org/support/topic/add-expires-headers-not-working-2/
-
Ensure text remains visible during webfont loadhttps://wordpress.org/support/topic/ensure-text-remains-visible-during-webfont-load-46/
-
Loading or saving the options tab creates loading foreverhttps://wordpress.org/support/topic/loading-or-saving-the-options-tab-creates-loading-forever/
-
Compatible with Digital Ocean CDN?https://wordpress.org/support/topic/compatible-with-digital-ocean-cdn/