Shopware, MODX, Craft CMS, and OpenCart can all send static website assets through a content delivery network, but each platform exposes a different integration layer. Shopware uses native filesystem configuration, MODX combines Manager settings with templates, Craft connects filesystems and aliases, and OpenCart uses a packaged extension.
This guide compares those four paths and explains what each one controls. It stays at architecture level, then sends you to the dedicated CDNsun tutorial for the complete configuration sequence.
Jump to the full tutorial for your CMS:
- Shopware CDN integration tutorial
- MODX CDN integration tutorial
- Craft CMS CDN integration tutorial
- OpenCart CDN integration tutorial
For more integration patterns, continue with CDN for WordPress, Joomla, Drupal, and Magento and CDN for PrestaShop, Odoo, TYPO3, and Grav.
Why use a CDN with a CMS
A CMS generates pages, manages media, and organizes the files that form a website. A CDN handles a different layer: delivery of suitable public assets through a separate CDN Service Domain. The application can continue rendering pages and processing dynamic requests at the origin while browsers request selected images, CSS, JavaScript, fonts, and public extension files through the CDN.
This separation can reduce latency for static files and lower repeated asset traffic at the origin. It is especially relevant when a storefront contains many product images, a theme produces compiled bundles, or a managed asset library serves transforms and uploads. This CMS CDN pattern supports static content delivery and website acceleration without moving application logic to the edge. For ecommerce performance, the integration should remain selective: carts, checkouts, accounts, administration areas, personalized responses, and other dynamic application routes should stay outside ordinary static-asset caching.
The main implementation question is therefore not whether the CMS is replaced, but where it generates public URLs. In these four tutorials, that control point ranges from deployment configuration to Manager fields, template variables, filesystem aliases, and an event-driven module.
Common prerequisites before setup
Prepare the delivery layer before changing the CMS. Back up the site files and database, create a CDN Static service with the public website as its origin, and confirm that the assigned CDN Service Domain is ready to use. The origin must expose the same public paths that the CDN will request.
- Use HTTPS for the CDN when the website itself uses HTTPS.
- Enable CORS when custom fonts need to load through the CDN hostname.
- Record whether the CMS expects a complete HTTPS URL or only a hostname.
- Keep administrator access and, where required, project-file and command-line access available.
- Plan to clear application caches and recompile or reinstall assets when the documented path requires it.
A trailing slash is not interchangeable across every field. Shopware, MODX’s cdn_url, and Craft’s CDN_BASE_URL use a complete HTTPS CDN URL without a trailing slash. The OpenCart module instead expects the hostname without a scheme or trailing slash.
CMS chooser table
| CMS | Best fit | Why people choose it | Typical CDN path | Tutorial-tested environment | Tutorial |
|---|---|---|---|---|---|
| Shopware | Shopware storefronts with deployment-managed configuration | One native configuration layer for product media, themes, and public assets | Filesystem adapters in config/packages/shopware.yaml |
Shopware 6.7.13.0 | Shopware tutorial |
| MODX | Sites needing granular control over managed media and template assets | Separate Manager and template controls for different asset classes | cdn_url, File System Media Source, Image TV, and template prefixes |
MODX Revolution 3.2.3-pl | MODX tutorial |
| Craft CMS | Projects combining managed assets with developer-controlled frontend files | Native aliases, filesystems, asset volumes, transforms, and template control | CDN_BASE_URL, @cdn, public filesystem, volume, and frontend configuration |
Craft CMS 5.10.13.2 | Craft CMS tutorial |
| OpenCart | OpenCart 3 stores that prefer a packaged module | An event-based integration that leaves core files unchanged | Install and configure CDNsun CDN for OpenCart 3 | OpenCart 3.0.5.0 with CDNsun CDN for OpenCart 3 v1.0.1 | OpenCart tutorial |
The environment column records the versions used to test each tutorial. It does not make a broader compatibility claim. Choose according to the controls already present in your project and the way your team deploys configuration.
Shopware CDN setup overview
Shopware’s documented path is configuration- and deployment-driven. Product media, compiled theme files, JavaScript, and public extension assets can use the CDN Service Domain while the storefront and its dynamic requests remain at the origin. No CMS plugin is part of this setup path.
The central change is in config/packages/shopware.yaml. Native public, theme, and asset filesystem adapters each receive the complete HTTPS CDN Service Domain without a trailing slash. Their local roots continue pointing to the project’s public directory: the change affects generated public URLs, not where Shopware stores those files at the origin.
After merging the filesystem section into any existing shopware configuration, the deployment must install public bundle assets, compile the storefront theme, and clear the production cache. Theme compilation should also run after a storefront theme changes or is deployed. The tutorial-tested environment is Shopware 6.7.13.0.
Read the full Shopware CDN integration tutorial

MODX CDN setup overview
MODX divides CDN control between global configuration, managed media, and template output. That makes the documented path useful when a site needs a hybrid arrangement rather than one blanket rewrite. MODX still generates each page at the origin, while selected static files receive CDN URLs.
A cdn_url System Setting exposes the complete HTTPS CDN Service Domain to templates without a trailing slash. Separately, a File System Media Source keeps its Base Path on the origin but uses the matching absolute CDN path as its Base URL. An Image TV assigned to that source then renders managed image URLs from the CDN-backed Media Source.
Theme stylesheets and JavaScript are handled explicitly in templates by prefixing their existing public paths with the cdn_url setting. Managed images use the assigned Image TV instead, so their storage path and public URL remain coordinated. This granular Manager-and-template workflow was tested with MODX Revolution 3.2.3-pl.
Read the full MODX CDN integration tutorial

Craft CMS CDN setup overview
Craft CMS separates managed Assets from developer-controlled frontend files. Its documented integration joins an environment variable, a reusable alias, a public filesystem, and an asset volume. Craft continues rendering pages at the origin while managed images, transforms, stylesheets, JavaScript, and other selected files can use the CDN Service Domain.
The project defines CDN_BASE_URL as the complete HTTPS CDN URL without a trailing slash, then maps it to an @cdn alias in config/general.php. A public Local Folder filesystem pairs a CDN Base URL such as @cdn/uploads with the origin Base Path. An Asset volume attached to that filesystem can keep transforms on the same CDN-backed filesystem.
Templates that render Craft-generated asset URLs can use the CDN URL supplied by the filesystem. Hard-coded theme files require separate template updates through @cdn; projects built with Vite instead configure the build’s public base URL and the Craft Vite plugin’s serverPublic value. Clear Craft’s caches after these changes. The tutorial was tested with Craft CMS 5.10.13.2.
Read the full Craft CMS CDN integration tutorial

OpenCart CDN setup overview
OpenCart follows the most packaged path in this group. The documented setup uses CDNsun CDN for OpenCart 3 v1.0.1 on OpenCart 3.0.5.0 to rewrite storefront static asset URLs. Product images, theme files, CSS, and JavaScript can then use the CDN while store application work remains at the origin.
Download the OpenCart 3.x installation package from the OpenCart Marketplace and upload it through OpenCart’s Extension Installer. The extension source code and issue tracker are available on GitHub. After the CDNsun CDN module is installed, OpenCart registers the native event used by the extension. The integration makes no changes to OpenCart core files, which keeps the delivery behavior contained in the module and Events system.
Configuration is intentionally narrow: enter the CDN Service Domain as a hostname, with no http:// or https:// scheme and no trailing slash, enable the module, and save it. This input format differs from the complete HTTPS URLs required by the other three tutorials, so copying a value between platforms without adjusting it can prevent correct rewriting.
Read the full OpenCart CDN integration tutorial

Verification and troubleshooting basics
Open the public site after configuration and confirm that it remains styled and functional. Inspect page source or browser developer tools, then verify that intended image, CSS, JavaScript, font, theme, and extension asset URLs begin with the CDN Service Domain. Test more than one page type and request an affected asset directly when its path looks wrong.
- If origin URLs remain, clear the CMS or application cache and repeat any required asset installation or compilation.
- If a file fails through the CDN, compare its CDN path with the same public path at the origin.
- If fonts are blocked, review the CORS configuration.
- If an HTTPS page reports mixed content, confirm that generated asset URLs use HTTPS.
- Confirm that dynamic, administrative, cart, checkout, account, and personalized routes still use the intended origin behavior.
Use the CDN content check tool to inspect an individual CDN URL. For a broader diagnostic sequence, follow the guide to debugging a CDN service.
Which CMS should you choose for CDN integration?
Choose Shopware when the project already treats theme compilation and filesystem configuration as deployment tasks. Choose MODX when editors and developers need distinct controls for managed images and template assets. Choose Craft CMS when the build combines a managed asset volume with developer-owned templates or Vite output. Choose OpenCart when an OpenCart 3 store fits the documented event-driven extension path.
The number of setup steps is less important than ownership. Shopware and Craft changes belong mainly in project configuration and deployment; MODX distributes control across Manager settings, Media Sources, TVs, and templates; OpenCart packages the rewrite behavior in a module. The best fit is the path your team can configure, test, and maintain consistently.
Start your setup with CDNsun
Continue with the tutorial that matches your platform:
CDNsun has provided CDN services since 2012, with pay-as-you-go pricing and no monthly fee, free SSL, and 24/7 support. Prepare the CDN hostname, apply the CMS-specific path, and verify representative asset requests before completing the rollout. The 15-day trial includes $5 credit.

