Plathix Lab / Replacing a file in place
Partly tested Behaviour test

Replacing a file in place

Replace Media swaps the file behind an existing WordPress attachment. These checks record what the replacement keeps, what it changes, and what a returning visitor sees afterwards. Most checks passed; browser cache is only partly covered.

The claim we are testing

“Replace Media updates the file behind the existing WordPress attachment. The attachment ID and its Plathix folder stay the same, so ID-based placements can stay connected.”

— Replace Media feature page

Why this is worth testing

A replacement is usually a correction on a live site: a new price, a fixed product photo, a new logo. If the attachment record changed along with the file, every place that uses it would have to be found and fixed by hand. So the test checks the record, not just the file.

What we check

Results

What we checked Result
Replace an existing Media Library file Passed
Keep the attachment ID and Plathix folder Passed
Keep title, alt text, caption, description, and attached post Passed
Update an ID-based placement Passed
Change file type (PNG → JPG) Passed — extension changed; old file removed
Browser cache after replacement Partial — front end refreshed; some cached views lag

How we tested

Latest run: 11 Oct 2026 on a live WordPress site with Plathix Free 1.0.0 (build b9d2149b), WordPress 7.1.3 and PHP 8.5.10, using Gutenberg and Elementor pages. Every replacement went through the Replace file button. Values were read through the WordPress REST API before and after, and the visitor check used a browser that kept its cache. The basic replacement and the ID-based placement also passed in the Free regression runs of 18 Aug and 9 Sep 2026.

Known limits

  • Changing the file type changes the extension, and the old file is removed. Images placed by URL in page content still point to the old address.
  • Browser cache: Gutenberg images with responsive sizes refreshed for a returning visitor. A Thumbnail-size image without responsive sizes, the block editor and Elementor Image widgets showed the old copy until the browser cache expired.

Not covered yet

  • WooCommerce product pages.
  • PRO: WP-CLI replacement and the “File replaced” entry in Activity history.
  • A new image with different pixel dimensions.

Related

Replace Media feature page Media folders Gutenberg compatibility test Elementor compatibility test

← All Plathix Lab tests

Test it on your own site

Plathix Free installs in a minute and deactivates cleanly. Your library is the only benchmark that counts.

Try Plathix Free All Lab tests