Mirror deletion
With Delete from cloud when deleted in WP on, permanently deleting an offloaded attachment in WordPress also deletes its files from your bucket. It is off by default.
How mirror deletion works#
- When an offloaded attachment is permanently deleted, WP Media Cloud deletes its main file, every image size and the original image (when WordPress kept one) from the bucket, then removes its offload record.
- It works however the attachment is deleted: from the Media Library, with a bulk action, by code or with WP-CLI.
- WordPress always deletes the local files of a deleted attachment, so with mirror deletion on, both copies are gone.
- Streamed videos are deleted from your Bunny Stream library too. See Bunny Stream.
- A file another attachment still uses, such as a WPML or Polylang media translation, is not deleted. Only the deleted attachment’s record is removed.
Enabling mirror deletion#

- Go to Media Cloud > Settings > Offload Behaviour.
- Turn on Delete from cloud when deleted in WP.
- Click Save Settings. The change applies to all later deletions.
On multisite, each site has its own setting.
When to leave mirror deletion disabled#
- Files shared across multiple sites: deleting on one site removes the file for every site sharing the bucket. Give each site its own path prefix, such as
sites/%site_id%, or leave mirror deletion off. - Staging sites: a staging copy that points at the production bucket would delete production files. Give staging its own bucket, or keep mirror deletion off there.
- Retention rules: if you must keep media after it leaves the site, leave it off. It cannot be limited to some file types.
Good to know#
- Only offloaded attachments are affected.
- Deletions from the bucket are permanent. Recovery depends on your provider, for example object versioning or a backup.
- Moving an attachment to the trash (with
MEDIA_TRASHon) does not delete anything from the bucket. Only permanent deletion does. - WP Media Cloud must be active and connected when the attachment is deleted.
- If the provider refuses a delete, the file stays in the bucket and no error is shown, but the offload record is still removed. Remove such files in your provider’s console.
- This is separate from Delete from Cloud in the Danger Zone card, which removes every offloaded file at once.
Cleaning up after deletions made while it was off#
Media deleted while mirror deletion was off keeps its files in the bucket. Clean Up Deleted Media in Media Cloud > Settings finds and deletes those files after you confirm. See Clean up deleted media.