Restoring Media to Local
Download cloud media back to the web server, remove cloud metadata and serve files locally again.
Use this procedure when you want to stop serving media from cloud storage and return to local WordPress uploads.
Back up the database first. Unlinking media from cloud storage is destructive if the local files are missing.
Before you start
- Confirm the server has enough disk space for the full media library.
- Disable Cloud Storage → Upload Handling → Delete Uploaded Files so new syncs are not deleted.
- Keep cloud storage enabled until the local copies are verified.
- Run a small batch first if the library is large.
Step 1 – Download the files
Run Media Cloud → Tools → Sync Local Files. The task downloads files from cloud storage to the local uploads directory and keeps the cloud metadata.
WP-CLI equivalents:
# Sync every attachment
wp mediacloud:storage sync-all-local [--limit=<number>] [--offset=<number>] [--page=<number>]
# Sync a specific list of attachments
wp mediacloud:storage sync-local <filename.csv>
Wait for the task to finish and review its report.
Step 2 – Verify the local copies
- Open
wp-content/uploadsand confirm recent uploads exist. - Check a sample of attachments on the front end.
- Run Verify Library with Include Local Files if you want a report.
Do not continue until the local files are present.
Step 3 – Unlink from cloud storage
Run Media Cloud → Tools → Unlink From Cloud or:
wp mediacloud:storage unlink [--limit=<number>] [--offset=<number>] [--page=<number>]
Unlinking removes the cloud metadata from attachments. It does not download files. Once complete, Media Cloud stops rewriting those URLs and WordPress serves the local files.
Step 4 – Disable cloud storage
- Turn off Enable Cloud Storage.
- Remove the CDN base URL if you set one.
- Clear your site and CDN caches.
- After verifying the site, delete the objects from the bucket manually.
If something goes wrong
- Images are broken after unlinking: the local files were missing. Restore the database backup, re-run the sync, then unlink again.
- Some URLs still point to cloud storage: clear caches and check the attachment metadata; run Fix Cloud Metadata.
- Tasks stall: see Task Manager.
Related
Need a hand with this guide?
Send support the exact step you’re stuck on and we’ll help you finish the setup.