Skip to content
Media CloudDocs
Happy HolidaysSave 20% with codeValid through December 31Shop the sale
Restoring Media to Local
On this page

Restoring Media to Local

Download cloud media back to the web server, remove cloud metadata and serve files locally again.

2 min read·2 tags

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

  1. Open wp-content/uploads and confirm recent uploads exist.
  2. Check a sample of attachments on the front end.
  3. Run Verify Library with Include Local Files if you want a report.

Do not continue until the local files are present.

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

  1. Turn off Enable Cloud Storage.
  2. Remove the CDN base URL if you set one.
  3. Clear your site and CDN caches.
  4. 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.

Need a hand with this guide?

Send support the exact step you’re stuck on and we’ll help you finish the setup.

Contact support
Start typing to search the docs

Escto close·⌘Kto open

View all results →