Offloft 0.1.0 is here: offload your WordPress media and know it arrived.Read what's new

Built to be scripted, and to behave predictably.

Offloft has WP-CLI commands for every task (wp offloft status, scan, offload, verify, resync, restore, exclude, include, issues, fix, job, test-connection) and a REST API under the offloft/v1 namespace. Normal offloading doesn't change your database, and every file's state is tracked and queryable.

$ wp offloft test-connection
All checks passed.
$ wp offloft offload --all
Started a bulk job.
$ wp offloft issues --format=json
[]
Commands are real. The output shown is an illustration.

WP-CLI

Every command below comes straight from the plugin's own command list. Run wp help offloft for each command's options.

CommandWhat it does
wp offloft statusShow how your media is doing.
wp offloft scanScan the media library before offloading. Nothing is uploaded.
wp offloft offloadUpload media items to your storage and check each copy.
wp offloft verifyCheck that cloud copies are there and complete (no download).
wp offloft resyncSync media items again now.
wp offloft restoreBring files missing from your server back from the cloud.
wp offloft excludeKeep media items on your server: they are no longer offloaded.
wp offloft includeOffload excluded media items again (the upload runs in the background).
wp offloft issuesList issues: what went wrong, what it affects, and what fixes it.
wp offloft fixFix issues: one, every one of a kind, or all Offloft can fix.
wp offloft runProcess the background tasks that are due now (uploads, checks, retries).
wp offloft test-connectionTest the connection to your storage.
wp offloft complete-setupFinish setup without the wizard, for a connection set in wp-config.php or by script.
wp offloft system-infoShow system information for a support request. Keys are masked.
wp offloft job listList running jobs and the last 20 finished ones.
wp offloft job pausePause a job after the media item in hand.
wp offloft job resumeResume a paused job where it stopped (in the background).
wp offloft job cancelCancel a job after the media item in hand. What is done stays done.

REST API

Routes live under offloft/v1. Authenticate the WordPress way: cookies with a nonce, or application passwords. Every route needs the capability to manage Offloft, and no answer contains a secret key, signature or presigned URL.

Lists answer {items, total, page, per_page} and also send X-WP-Total and X-WP-TotalPages. Errors are WP_Errors with a plain-language message and an offloft_* code.

RouteMethods
/offloft/v1/activityGET
/offloft/v1/filesGET
/offloft/v1/files/actionsPOST
/offloft/v1/files/{id}GET
/offloft/v1/issuesGET
/offloft/v1/issues/groupsGET
/offloft/v1/issues/groups/{type}/fixPOST
/offloft/v1/issues/{id}/fixPOST
/offloft/v1/issues/{id}/ignorePOST
/offloft/v1/issues/{id}/unignorePOST
/offloft/v1/jobsGET, POST
/offloft/v1/jobs/{id}GET
/offloft/v1/jobs/{id}/{command}POST
/offloft/v1/profilesPOST
/offloft/v1/profiles/activeGET
/offloft/v1/profiles/bucketsPOST
/offloft/v1/profiles/buckets/createPOST
/offloft/v1/profiles/testPOST
/offloft/v1/profiles/{id}/delivery-testPOST
/offloft/v1/profiles/{id}/testPOST
/offloft/v1/providersGET
/offloft/v1/providers/{id}/guideGET
/offloft/v1/queue/runPOST
/offloft/v1/scanGET, POST
/offloft/v1/settingsGET, PUT
/offloft/v1/settings/debug-logGET, DELETE
/offloft/v1/settings/environmentGET
/offloft/v1/settings/exportGET
/offloft/v1/settings/importPOST
/offloft/v1/settings/key-previewGET
/offloft/v1/setup/completePOST
/offloft/v1/setup/progressGET, PUT
/offloft/v1/statusGET
/offloft/v1/system-infoGET
/offloft/v1/url-replaceGET
/offloft/v1/url-replace/previewPOST
/offloft/v1/url-replace/runPOST
/offloft/v1/url-replace/undoPOST

How are URLs served?

Offloft changes media URLs as a page is built. There is no search-and-replace, so your database keeps its original addresses and turning Offloft off takes effect at once.

A page cache stores the page with its cloud addresses in it. After you turn offloading on or off, clear your page cache so saved pages pick up the change.

File states

These are the exact values the API returns. Only verified and local_removed files may be served from the cloud.

StateMeaning
pendingWaiting to be uploaded. Your site serves the local file.
uploadingBeing sent to your bucket. Your site serves the local file.
uploadedSent, and waiting for its check. Your site serves the local file.
verifiedChecked in your bucket. Your site may serve the cloud copy.
failedThe upload or check didn't succeed. Your site serves the local file.
missing_localThe file isn't on your server.
missing_cloudThe file isn't in your bucket, or doesn't match what was sent.
local_removedVerified in your bucket, with the local copy removed by Pro. Your site serves the cloud copy.
excludedYou chose to keep this file on your server, so it is not offloaded.
deletingIts media item was deleted in WordPress, and its cloud copy is being removed.

Requirements and compatibility

PHP 8.1 or later with the cURL extension, and WordPress 6.5 or later. Tested up to WordPress 7.1. Multisite hasn't been tested yet, so please test on a copy first.

Source

Offloft is licensed under GPL-2.0-or-later. The free plugin's code, with its source, is in the download zip.

Your media, in your bucket, checked.

Install Offloft free. Setup takes five steps, and nothing moves until the connection test passes.

Type to search.