Skip to main content
Perch can deliver uploaded resources through a Gcore CDN resource by adding the CDN domain to its resource paths.
Back up site files and the database before making changes. These steps assume a standard local perch/resources directory without a custom or remote resource-storage handler.
Create a CDN resource before starting the integration. Configure its custom domain with a valid CNAME record and an active SSL certificate.
  1. In the Gcore Customer Portal, find the custom domain on the CDN resources page.
  2. Confirm that the CDN origin can retrieve a known file from the default resource directory. Perch requires this directory to be directly accessible through a URL, as described in the resource documentation. Use the origin protocol and hostname configured for the CDN resource:
    Continue only after the origin URL returns the expected file.
  3. Open perch/config/config.php on the server and find:
  4. Replace it with the custom domain as the host prefix:
  5. Optional — Perch resource buckets can use local directories, remote storage, private download scripts, or custom handlers. In perch/config/buckets.php, update only local file buckets that the same CDN origin can access, and leave remote or access-controlled buckets unchanged. Prefix the eligible bucket’s web_path with the custom domain while keeping its original path:
  6. Save the configuration files.
  7. Confirm the integration by opening the browser’s developer tools (press F12), selecting the Network tab, and refreshing the page — eligible resource URLs should now load from the custom domain instead of the origin domain.