These instructions apply to PrestaShop 9. Back up the store files and database before changing performance settings.
1
Prepare the CDN resource
In the Gcore Customer Portal, create a CDN resource with the PrestaShop store as its origin.Add a custom domain —
cdn.example.com — and enable HTTPS. Confirm that the CDN domain can retrieve files from the /img, /themes, and /modules directories.2
Open the Performance page
Sign in to the PrestaShop Back Office and navigate to Advanced Parameters > Performance.
3
Set the media server
In the Media servers section, enter the custom CDN hostname in Media server #1 —
cdn.example.com.Enter only the hostname. Do not include https://, a path, or a trailing slash. PrestaShop 9 supports one media server by default.4
Save and clear the cache
Select Save, and then select Clear cache at the top of the Performance page.
5
Verify CDN delivery
Open the storefront in a private browser window. Open the browser developer tools, select Network, and reload the page.Filter requests by
cdn.example.com. Confirm that static files use the CDN hostname and return successful HTTP responses.Troubleshooting
When static files fail to load from the CDN hostname, the cause is usually a missing origin path, an origin connectivity error, a TLS or mixed-content block, a cache that still serves the previous URL, or a theme that does not use the media-server rewrite.- For a
404response, confirm that the origin contains the requested path and that the CDN can retrieve the/img,/themes, and/modulesdirectories. - For a
502response, check the origin hostname, origin pull protocol, port, and host header in the CDN resource. - If the browser blocks requests, confirm that the custom CDN domain has a valid TLS certificate and the storefront uses HTTPS URLs.
- If old assets remain visible, clear the PrestaShop cache and purge CDN cache.
- If only some URLs use the CDN, check theme and module compatibility with the PrestaShop media-server feature. Custom absolute URLs are not rewritten.