What is Safe Replace in Mediapapa?

Mediapapa Feature

Safe Replace is a Pro feature in Mediapapa that replaces a media file sitewide. Before removing the original, it scans every reference to that file across posts, blocks, custom fields, widget areas and theme options, and updates every ID and URL to point to the replacement. Nothing breaks.

What Safe Replace does step by step

First, Mediapapa queries the usage index to build a complete map of every location where the original file is referenced. This includes attachment IDs in Gutenberg block attributes, URLs in Classic Editor content, ACF field values, Elementor widget meta, featured image postmeta and any other location the index covers.

Second, each reference is updated to point to the replacement file. ID references are updated to the new attachment ID. URL references are updated to the new file URL. Database writes are batched and transaction-safe.

Third, once all references are updated and confirmed, the original file is removed. At no point during the process is there a broken reference.

When Safe Replace matters most

On simple sites where a file appears in one or two posts, manual replacement is practical. On a site where a product image is used in 40 posts, 3 Elementor templates and 2 ACF gallery fields, manual replacement is error-prone and time-consuming. Safe Replace handles this in one action.

Safe Replace is also the correct way to consolidate duplicates. When two identical files exist with different IDs, Safe Replace updates all references to the duplicate to point to the reference version, then removes the duplicate.

Frequently asked questions

Is Safe Replace the same as Enable Media Replace?

No. Enable Media Replace swaps the file and can preserve the URL, but it does not scan the database for ID references or update them. Safe Replace updates every ID and URL reference sitewide before the original is removed. On complex sites the difference is significant.

Is Safe Replace available in the free version?

No. Safe Replace is a Pro feature. Mediapapa Free includes the usage index and Deletion Warnings, which give you visibility into where files are used. The bulk replacement action requires a paid plan.