ACPT
This page explains how WP Media Cloud serves ACPT (Advanced Custom Post Types) media fields from your CDN. It covers what the integration changes, what you need to switch on, its limits, and how it works with URL Replace.
What the integration does#

Most field plugins turn an attachment ID into a URL with standard WordPress functions, which WP Media Cloud already rewrites. ACPT does not. It builds media URLs itself from the uploads base URL that wp_upload_dir() returns, plus the file path.
So WP Media Cloud changes that base URL instead. On front-end pages and REST API requests, it filters upload_dir at priority 999 and swaps two values:
| Value | What WP Media Cloud does |
|---|---|
baseurl | Replaced with your CDN base URL |
url | The local uploads part is replaced with your CDN base URL |
basedir, path, subdir | Not changed, so uploads and image editing keep using the server folders |
This happens on the fly, on every request. Nothing is written to the database. Turn off Rewrite URLs or deactivate WP Media Cloud and ACPT URLs go back to local at once.
The change covers ACPT Image, Gallery, Image Slider, Video, Audio and File fields. It works for the [acpt] shortcode, for direct acpt_*() PHP calls, and for page builders that read ACPT fields through ACPT itself.
What you need to switch on#
There is no ACPT setting in WP Media Cloud. The integration starts by itself when ACPT is active. Check these:
- Go to Media Cloud > Settings and make sure Rewrite URLs is on. If it is off, the integration does nothing.
- Make sure a CDN or public URL is set for your provider. Without one, the integration does nothing.
- Offload your existing media first. Use Offload All Media in the Dashboard Bulk Offload card (see the bulk migration tool).
- Open Media Cloud > Integrations. The ACPT card shows Active and the ACPT version.
The Integrations page caches what it detects for up to 5 minutes. If you just activated ACPT and the card still says Not installed, wait a few minutes or save your settings.
Limits#
- Admin screens are not changed. In wp-admin (except REST API requests) the uploads URL stays local. The Media Library, uploads and the image editor keep working as normal.
- Every front-end uploads URL changes, not only ACPT’s. While ACPT is active, any theme or plugin that builds a front-end URL from
wp_upload_dir()gets the CDN address. That includes files outside the Media Library, such as builder CSS files, plugin cache folders or BuddyBoss avatars. Those files are not in your bucket, so they can fail to load. If something breaks after you activate ACPT, check whether it lives in your uploads folder but outside the Media Library. Font plugins are the exception: Jooosi Fon, Nahnu Fonts and Fonts Plugin always get your site’s uploads address. See Font plugins. - The CDN URL is used even for files not yet offloaded. ACPT URLs point at the CDN whether or not that file has been uploaded to storage. Run a bulk offload so every ACPT file is in your bucket. Post content works differently: there, WP Media Cloud 1.1.9 or newer only points offloaded files at the CDN.
- ACPT’s own cache. ACPT can cache resolved media for up to an hour. Values cached before WP Media Cloud was set up may show local URLs until that cache expires. Re-saving the post refreshes it.
URL Replace (beta)#
ACPT saves the resolved media URL in post meta, not just an attachment ID. On the front end you do not need URL Replace, because the integration rewrites the base URL as pages load.
You can still run URL Replace (beta) from Media Cloud > Migration. It scans wp_postmeta, so it changes the stored ACPT URLs to CDN URLs. After that, the stored values stay on the CDN even if you deactivate WP Media Cloud. Use Revert selected to local URLs to undo it. Back up your database first.
Troubleshooting#
| What you see | What it means | How to fix it |
|---|---|---|
| ACPT field shows a local URL on the front end | Rewrite URLs is off, no CDN URL is set, or ACPT served a cached value | Turn on Rewrite URLs, check the CDN URL in Settings, then re-save the post |
| ACPT image shows a broken CDN link | The file was never offloaded | Run Offload All Media from the Dashboard |
| Theme styles, avatars or cached images break after activating ACPT | Those files sit in the uploads folder but are not in the Media Library, so they are not in your bucket | Ask the plugin’s vendor if it can load files another way, or contact WP Media Cloud support |
| ACPT uploads are not offloaded | Offload on upload is off, or storage cannot be reached | Turn on Offload on upload in Settings, then run Run All Checks on the Health page |