Media Offload
Keep a site's media library in cloud storage. For the same in the control panel, see Keep media in cloud storage with Media Offload.
Operations
| Operation | Request |
|---|---|
| Get Media Offload on a site | GET / |
| See what turning on Media Offload would move | POST / |
| Turn on Media Offload for a site | POST / |
| Set Media Offload's settings for a site | PUT / |
| Start a Media Offload operation on a site | POST / |
| Stop a Media Offload operation | POST / |
| Try setting up Media Offload again | POST / |
| Cancel a Media Offload setup that failed | POST / |
| Turn off Media Offload for a site | POST / |
The SiteMediaOffload object
Media Offload on a site: its media library kept in Rabbitflare's cloud storage, every file at the same address as before, with the settings, what storage holds, the operations running, and the storage included with the server.
| Field | Type and description | ||||||||
|---|---|---|---|---|---|---|---|---|---|
status | string
Known values: | ||||||||
blockedReason | string or null Why the site can't have Media Offload right now: a server of your own or a trial server, a staging copy, a site still installing, a stopped server, and the like. Null when it can. | ||||||||
settings | object The site's Media Offload settings. | ||||||||
mode | string
Known values: | ||||||||
freeAfterDays | integer In free up disk mode, how many days new files stay on the server before their copy there is removed (image plugins finish their work first): 1, 3, 7, 14, 30, 90. | ||||||||
kinds | array of strings The kinds of files kept in storage. Known values: | ||||||||
keep | array of strings Folders of the uploads folder kept on the server, besides the ones always kept there (private downloads and form uploads, backups and logs, files plugins rebuild, code). | ||||||||
settingsStatus | string Whether the settings are in place on the site's server: Known values: | ||||||||
lastError | string or null Why setting it up, applying the settings or turning it off didn't finish. Null when nothing failed. | ||||||||
pausedReason | string or null Why new files aren't copied to storage right now (an unpaid Media Offload bill). Everything already in storage keeps being served. Null otherwise. | ||||||||
enabledAt | string or null An ISO 8601 time, in UTC When it was turned on. Null while it's off. | ||||||||
stored | object or null What storage holds for the site, as its server last reported. Null while it's off, or before the server first reported. | ||||||||
files | integer Files in storage. | ||||||||
bytes | integer Their size, in bytes (decimal: 1 GB is 1,000,000,000 bytes). | ||||||||
freedFiles | integer Of those, files removed from the server to free up disk: storage holds the only copy. | ||||||||
freedBytes | integer Their size, in bytes. | ||||||||
kinds | array of objects What storage holds, by kind of file. Empty while it's off. | ||||||||
kind | string A kind of file: Known values: | ||||||||
files | integer Files of this kind in storage. | ||||||||
bytes | integer Their size, in bytes. | ||||||||
freedFiles | integer Of those, files removed from the server to free up disk. | ||||||||
freedBytes | integer Their size, in bytes. | ||||||||
pending | object or null Files waiting to be copied to storage. Null while it's off, or before the server first reported. | ||||||||
files | integer Files. | ||||||||
bytes | integer Their size, in bytes. | ||||||||
keptOnServer | array of objects Files of the uploads folder that stay on the server, by reason. | ||||||||
reason | string Why they stay: Known values: | ||||||||
files | integer Files. | ||||||||
bytes | integer Their size, in bytes. | ||||||||
delivery | object or null Whether the site serves files from storage: checked every 10 minutes, and files stay on the server until it passes. Null while it's off, or before the first check. | ||||||||
ok | boolean Whether the last check passed: a test file was fetched from storage through the site. | ||||||||
checkedAt | string or null An ISO 8601 time, in UTC When it was last checked. Null before the first check. | ||||||||
error | string or null Why the last check didn't pass. Null when it passed. | ||||||||
lastSyncAt | string or null An ISO 8601 time, in UTC When files were last copied to storage. Null before the first copy. | ||||||||
lastVerify | object or null The last check of every file in storage (a | ||||||||
verifiedAt | string An ISO 8601 time, in UTC When every file was last checked. | ||||||||
repaired | integer Files repaired in storage. | ||||||||
lost | integer Files missing from storage that the server no longer has either. | ||||||||
fetchedFromStorage | object or null What visitors fetched from storage this month: files that weren't on the server. Null while it's off. | ||||||||
month | string The month, like | ||||||||
bytes | integer Bytes fetched. | ||||||||
requests | integer Files fetched. | ||||||||
popularFiles | integer Files visitors fetch often, brought back to the server for 30 days so they're delivered faster. | ||||||||
freeingPaused | boolean This month visitors fetched more than twice what the site stores, so no more files are removed from the server for now (free up disk). Nothing else changes. | ||||||||
failedFiles | array of objects Up to 10 files that couldn't be copied to storage or checked there. They're tried again by themselves and stay on the server meanwhile. | ||||||||
path | string The file, in the uploads folder. | ||||||||
failedAt | string An ISO 8601 time, in UTC When it last failed. | ||||||||
conflictingPlugins | array of strings Other media offload plugins active on the site. Media Offload pauses while one is: deactivate it in WordPress. | ||||||||
run | object or null The operation running now, or one that finished in the last minute. Null otherwise. | ||||||||
id | string The run's id. | ||||||||
operation | string What it does: Known values: | ||||||||
status | string
Known values: | ||||||||
stage | string or null What it's doing now, in a few words, like | ||||||||
filesDone | integer Files done so far. | ||||||||
filesTotal | integer Files it has to do (0 until it has counted them). | ||||||||
filesFailed | integer Files that couldn't be done: they're tried again later, and stay on the server meanwhile. | ||||||||
bytesDone | integer Bytes done so far. | ||||||||
bytesTotal | integer Bytes it has to do (0 until it has counted them). | ||||||||
bytesPerSecond | number or null How fast it's going, in bytes a second. Null when it isn't running. | ||||||||
filesPerSecond | number or null How fast it's going, in files a second. Null when it isn't running. | ||||||||
etaSeconds | integer or null About how many seconds are left. Null when it isn't known. | ||||||||
error | string or null Why it didn't finish (with | ||||||||
turnOffAfter | boolean A | ||||||||
startedAt | string or null An ISO 8601 time, in UTC When it started. Null while it's queued. | ||||||||
finishedAt | string or null An ISO 8601 time, in UTC When it finished. Null until then. | ||||||||
createdAt | string An ISO 8601 time, in UTC When it was asked for. | ||||||||
recentRuns | array of objects Up to 5 earlier operations, newest first. | ||||||||
id | string The run's id. | ||||||||
operation | string What it does: Known values: | ||||||||
status | string
Known values: | ||||||||
stage | string or null What it's doing now, in a few words, like | ||||||||
filesDone | integer Files done so far. | ||||||||
filesTotal | integer Files it has to do (0 until it has counted them). | ||||||||
filesFailed | integer Files that couldn't be done: they're tried again later, and stay on the server meanwhile. | ||||||||
bytesDone | integer Bytes done so far. | ||||||||
bytesTotal | integer Bytes it has to do (0 until it has counted them). | ||||||||
bytesPerSecond | number or null How fast it's going, in bytes a second. Null when it isn't running. | ||||||||
filesPerSecond | number or null How fast it's going, in files a second. Null when it isn't running. | ||||||||
etaSeconds | integer or null About how many seconds are left. Null when it isn't known. | ||||||||
error | string or null Why it didn't finish (with | ||||||||
turnOffAfter | boolean A | ||||||||
startedAt | string or null An ISO 8601 time, in UTC When it started. Null while it's queued. | ||||||||
finishedAt | string or null An ISO 8601 time, in UTC When it finished. Null until then. | ||||||||
createdAt | string An ISO 8601 time, in UTC When it was asked for. | ||||||||
export | object or null The download of the whole media library (an | ||||||||
runId | string The | ||||||||
status | string
Known values: | ||||||||
files | integer or null Files in it. Null until it's ready. | ||||||||
bytes | integer or null Its size, in bytes. Null until it's ready. | ||||||||
expiresAt | string or null An ISO 8601 time, in UTC When the download is removed. Null until it's ready. | ||||||||
createdAt | string An ISO 8601 time, in UTC When it was asked for. | ||||||||
allowance | object or null The storage included with the site's server, shared by its sites, and what uses it. Storage beyond it is billed by use after each month ends. Null on servers of your own. | ||||||||
includedBytes | integer Storage included with the server, shared by its sites (decimal: 1 GB is 1,000,000,000 bytes). | ||||||||
usedBytes | integer Storage the server's sites use now. | ||||||||
sites | array of objects The sites using it, largest first. Show its 3 fields
| ||||||||
extraCentsPerGbMonth | number The price of each GB stored beyond what's included, per month, in US cents (it can have decimals). Billed after the month ends. | ||||||||
monthToDateCents | integer or null Extra storage this month so far, before it's billed, in US cents. Null for a token without | ||||||||
currency | string Always Always | ||||||||
reportedAt | string or null An ISO 8601 time, in UTC When the site's server last reported its figures. Null before it first did. |
Example
{
"status": "active",
"blockedReason": null,
"settings": {
"mode": "copy",
"freeAfterDays": 7,
"kinds": [
"image",
"video",
"audio",
"document",
"archive",
"font"
],
"keep": []
},
"settingsStatus": "applied",
"lastError": null,
"pausedReason": null,
"enabledAt": "2026-11-02T09:14:31.000Z",
"stored": {
"files": 18412,
"bytes": 12480000000,
"freedFiles": 0,
"freedBytes": 0
},
"kinds": [
{
"kind": "image",
"files": 18120,
"bytes": 9870000000,
"freedFiles": 0,
"freedBytes": 0
},
{
"kind": "video",
"files": 12,
"bytes": 2410000000,
"freedFiles": 0,
"freedBytes": 0
},
{
"kind": "document",
"files": 280,
"bytes": 200000000,
"freedFiles": 0,
"freedBytes": 0
}
],
"pending": {
"files": 0,
"bytes": 0
},
"keptOnServer": [
{
"reason": "folder",
"files": 310,
"bytes": 41000000
},
{
"reason": "code",
"files": 4,
"bytes": 12000
}
],
"delivery": {
"ok": true,
"checkedAt": "2026-11-19T10:00:12.000Z",
"error": null
},
"lastSyncAt": "2026-11-19T10:02:40.000Z",
"lastVerify": {
"verifiedAt": "2026-11-16T03:04:41.000Z",
"repaired": 0,
"lost": 0
},
"fetchedFromStorage": {
"month": "2026-11",
"bytes": 1240000000,
"requests": 5210
},
"popularFiles": 0,
"freeingPaused": false,
"failedFiles": [],
"conflictingPlugins": [],
"run": null,
"recentRuns": [
{
"id": "c4d5e6f7-8a9b-4c0d-9e1f-2a3b4c5d6e7f",
"operation": "verify",
"status": "done",
"stage": null,
"filesDone": 18412,
"filesTotal": 18412,
"filesFailed": 0,
"bytesDone": 12480000000,
"bytesTotal": 12480000000,
"bytesPerSecond": null,
"filesPerSecond": null,
"etaSeconds": null,
"error": null,
"turnOffAfter": false,
"startedAt": "2026-11-16T03:00:05.000Z",
"finishedAt": "2026-11-16T03:04:41.000Z",
"createdAt": "2026-11-16T03:00:01.000Z"
}
],
"export": null,
"allowance": {
"includedBytes": 100000000000,
"usedBytes": 12480000000,
"sites": [
{
"siteId": "8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"name": "Shop",
"bytes": 12480000000
}
],
"extraCentsPerGbMonth": 2.085,
"monthToDateCents": 0,
"currency": "usd"
},
"reportedAt": "2026-11-19T10:02:40.000Z"
} The MediaOffloadInspection object
What turning Media Offload on would move to storage and what would stay on the server, read from the site's server.
| Field | Type and description |
|---|---|
ready | boolean Nothing in the site's setup stands in the way of turning it on ( |
problems | array of strings What stands in the way, one sentence each. |
conflictingPlugins | array of strings Other media offload plugins active on the site: deactivate them in WordPress first. |
files | integer Files in the uploads folder. |
bytes | integer Their size, in bytes. |
kinds | array of objects What would move to storage, by kind of file. |
kind | string A kind of file: Known values: |
files | integer Files of this kind that would move to storage. |
bytes | integer Their size, in bytes. |
keptOnServer | array of objects Files of the uploads folder that stay on the server, by reason. |
reason | string Why they stay: Known values: |
files | integer Files. |
bytes | integer Their size, in bytes. |
keptFolders | array of objects Up to 10 folders kept on the server, largest first. |
folder | string A folder of the uploads folder. |
bytes | integer What stays there, in bytes. |
disk | object or null The site's server's disk. Null when it couldn't be read. |
freeBytes | integer Free space, in bytes. |
totalBytes | integer The disk's size, in bytes. |
multisite | boolean Whether the site is a WordPress multisite network. |
checkedAt | string An ISO 8601 time, in UTC When the media library was inspected (an inspection is kept 5 minutes). |
Example
{
"ready": true,
"problems": [],
"conflictingPlugins": [],
"files": 18726,
"bytes": 12521012000,
"kinds": [
{
"kind": "image",
"files": 18120,
"bytes": 9870000000
},
{
"kind": "video",
"files": 12,
"bytes": 2410000000
},
{
"kind": "audio",
"files": 0,
"bytes": 0
},
{
"kind": "document",
"files": 280,
"bytes": 200000000
},
{
"kind": "archive",
"files": 0,
"bytes": 0
},
{
"kind": "font",
"files": 0,
"bytes": 0
},
{
"kind": "other",
"files": 0,
"bytes": 0
}
],
"keptOnServer": [
{
"reason": "folder",
"files": 310,
"bytes": 41000000
},
{
"reason": "code",
"files": 4,
"bytes": 12000
}
],
"keptFolders": [
{
"folder": "woocommerce_uploads",
"bytes": 41000000
}
],
"disk": {
"freeBytes": 52300000000,
"totalBytes": 80000000000
},
"multisite": false,
"checkedAt": "2026-11-19T10:05:12.000Z"
}