Replace a File Without Rebuilding Every Page That Uses It
- An image can be used in dozens of places across a WordPress site. Replacing it by uploading a new attachment often means updating blocks, featured images, galleries, templates, product records, and other references that still point to the old attachment.
- Media Replacement takes the opposite approach: keep the attachment and change the file behind it. The WordPress attachment ID remains the same, and when Keep Filename is enabled, the URL remains the same as well. Existing pages continue referring to the same media record while the pixels or file contents change underneath it.
Keep the Same URL or Intentionally Use a New Filename
- The default workflow writes the replacement onto the attachment's current path. This is usually the safest choice when the main reason for using Media Replacement is to preserve existing references.
- You can also choose to use the sanitized filename of the newly uploaded file. In that mode, WP PowerSuite updates the attachment path and GUID after moving the replacement into the same upload directory. The new filename must not collide with an existing file.
If you need a broader filename-management workflow with patterns, bulk renaming, reference scanning, and optional redirects, Media Rename Manager is the dedicated tool for that job.
Validate Compatible Replacement Types
- Replacing a file in place should not silently turn an image attachment into an unrelated executable or media type. WP PowerSuite checks replacement compatibility before and after the WordPress upload handling step.
- JPEG, PNG, GIF, and WebP images can replace each other within that image family. PDFs can replace PDFs, and supported common video containers can replace other supported video containers. Other formats, including AVIF and SVG, are restricted to same-extension replacements.
- This validation helps preserve the meaning of the existing attachment record while still allowing practical updates such as replacing a JPEG with a newer PNG or swapping one MP4 for another compatible video file.
Regenerate Metadata After the Source Changes
- For image attachments, replacing the original source can invalidate the dimensions and derivative files stored in WordPress metadata. A new image may have a different aspect ratio or resolution even when its filename is unchanged.
- WP PowerSuite removes old intermediate-size files recorded by the attachment metadata, installs the new source, and runs WordPress image metadata generation again. This lets current registered sizes be rebuilt from the replacement instead of leaving old thumbnail files that belong to the previous image.
Keep an Optional Backup Before Overwriting
- Sometimes a replacement is meant to be reversible. Enable Keep Backup and WP PowerSuite copies the current file before the overwrite takes place, then registers the backup as a new attachment labelled as a backup of the original.
- This creates a visible WordPress recovery copy instead of silently hiding the old bytes elsewhere on the server. The option is disabled by default so routine replacements do not fill the Media Library with backup attachments unless you actually want them.
Bust Caches After a Replacement
- Keeping the same filename and URL is convenient, but browsers, CDNs, and page caches may already have the previous file cached. If the URL never changes, visitors can continue seeing old pixels long after WordPress has replaced the file on disk.
- WP PowerSuite records a replacement timestamp and appends it as a version query parameter when WordPress returns the attachment URL or image source. This changes the requested URL after replacement while preserving the underlying attachment path, giving caches a clear signal that the asset has changed.



