1
Prepare the CDN resource
Prepare a CDN hostname for WP Rocket:
- Create a CDN resource with the WordPress site as its origin.
- Configure an HTTPS custom domain,
cdn.example.com. - Confirm that the custom domain can retrieve a public static asset from the origin.
2
Download WP Rocket
Sign in to the WP Rocket account and download the plugin ZIP. Keep the archive compressed for the WordPress upload.
3
Install WP Rocket
In WordPress Admin:
- Navigate to Plugins > Add Plugin.
- Select Upload Plugin and select the WP Rocket ZIP.
- Select Install Now.
- Select Activate Plugin.
4
Add the CDN hostname
In WordPress Admin, navigate to Settings > WP Rocket > Content Delivery > Other CDN, then:
- Select ADD CNAME.
- In CDN CNAME(S), enter the Gcore custom domain without a path —
cdn.example.com. - Keep For All Files selected to rewrite supported images, CSS, and JavaScript files.
- Select SAVE CHANGES.

5
Verify CDN delivery
Verify the result on a cached page:
- In WordPress Admin, navigate to Settings > WP Rocket > Dashboard and select Clear and preload cache. Alternatively, use the WP Rocket toolbar menu and select Clear and preload cache.
- Open the WordPress site in a logged-out private browser window.
- In browser developer tools, open Network, disable the browser cache, and reload the page.
- Select a configured image, CSS file, or JavaScript file and confirm:
- The request URL uses
cdn.example.com. - The response has a successful HTTP status.
- A repeated request to a cacheable asset returns
HITin theCacheresponse header.
- The request URL uses
URL rewriting logic
WP Rocket changes eligible asset URLs in cached HTML to the configured CDN hostname. Gcore CDN retrieves each matching asset from the WordPress origin when the asset is first requested. Assets loaded through AJAX or inserted dynamically after the HTML is generated might retain the origin hostname. WP Rocket does not upload or remove origin files.Troubleshooting
- Asset URLs keep the origin hostname: Clear the WP Rocket cache and test while logged out. Confirm that the asset hostname matches the Site Address value in Settings > General, including the
wwwvariant. - Only some assets use CDN: Confirm that For All Files is selected. Assets loaded through AJAX or inserted dynamically might require application-level changes.
- The browser reports mixed content: Use HTTPS for the WordPress site and the Gcore CDN domain.
- Fonts fail to load: Font files require an
Access-Control-Allow-Originresponse header that permits the WordPress site’s origin or*. WP Rocket automatically adds the required CORS rules to.htaccesson supported Apache installations. For NGINX, add the rules manually to the virtual host configuration. See Resolving issues with CDN and fonts in the WP Rocket knowledge base. - Updated assets remain stale: Purge the affected Gcore CDN cache and clear the WP Rocket cache.