Devenia Replace Media
Replace an existing WordPress attachment without creating another Media Library item or selecting a new attachment on every page. Correct one shared source A product photograph appears on a product page and two articles. If it needs correcting everywhere, open the existing Media Library item and cho
About this tool.
Replace an existing WordPress attachment without creating another Media Library item or selecting a new attachment on every page.
Correct one shared source
A product photograph appears on a product page and two articles. If it needs correcting everywhere, open the existing Media Library item and choose Replace File. The pages continue to use the same attachment ID.
If one page must keep the old photograph, upload a separate attachment instead. Replacement changes a shared source; it does not create a per-page variation.
What is preserved
- The attachment ID and WordPress relationships that refer to it.
- The attachment title, caption, description and alt text. Review that text when the replacement changes its meaning.
- The existing file path used for the replacement. WordPress image processing may generate a different full-size image when it scales, rotates or converts an image. Check the resulting URL and existing links.
WordPress regenerates attachment metadata and available image sizes. A smaller replacement may not recreate an old thumbnail size. Fixed thumbnail URLs in page HTML, CSS, external messages or exported pages are not rewritten automatically.
Where to find Replace File
Use the Media Library list, Edit Media screen or supported WordPress media dialogs. Elementor attachment details provide another entry point when Elementor is active. The normal Media Library workflow does not require Elementor or an AI client.
Prepare the replacement
Save a separate copy of the old file if you may need it again. Replacement does not provide a permanent revision history or an Undo button.
Prefer the same file format and prepare dimensions suitable for every placement. Although an allowed replacement type updates the recorded MIME type, a web server can infer the served type from the retained filename extension. A different format under an old extension is not a dependable conversion workflow.
Check caches and published pages
A changing v parameter is added to attachment and responsive image URLs produced through the supported WordPress filters. Each replacement gets a newer value, including repeated edits in the same second.
This does not purge every browser, page cache or CDN. Hard-coded URLs are not rewritten. Check representative pages and direct download links; clear the relevant cache or rebuild exported pages when needed.
Automation abilities
When WordPress Abilities API is available, two operations are registered:
- media/replace-from-url requires attachment_id and url. The HTTP or HTTPS source must pass WordPress URL validation.
- media/replace-base64 requires attachment_id, filename and base64. A base64 data URI is accepted. The decoded file must be no larger than 20 MiB; server request limits can be lower.
The account must have upload_files and permission to edit the selected attachment. Both operations use the same replacement function as the editor. A successful response includes the attachment ID, URL, MIME type, dimensions, version and message. A failed ability returns success: false with a message.
An MCP client needs a compatible connection to WordPress Abilities API. Automation is optional; replacing files through the Media Library works without it.
Read the product guide and WordPress documentation for image-size generation .
Getting started.
For update notifications in WordPress, install Devenia MCP Updater . The updater is optional. You choose which plugins update automatically through WordPress.
- 01Download the plugin ZIP .
- 02Open Plugins > Add New > Upload Plugin in WordPress.
- 03Upload the ZIP and activate Devenia Replace Media.
- 04Open the existing attachment and choose Replace File.
- 05Upload the corrected file and check its pages, images and direct links.
WordPress 5.7 or later, PHP 7.4 or later, and a writable upload directory are required. The account must be able to upload files and edit the selected attachment.
Frequently asked questions.
Should I replace the attachment or upload another file?
Replace it when the correction belongs in every use of that attachment. Upload a separate attachment when some pages must keep the old content.
Are titles, captions and alt text rewritten?
No. They remain attached to the same item. Review and edit them if the replacement changes what the file shows or means.
Will every old thumbnail link still work?
Not necessarily. WordPress generates sizes from the new dimensions and current settings. A smaller file may not recreate an old size. Check fixed thumbnail URLs separately.
Can I undo a replacement?
There is no permanent file history or Undo button. Save a separate copy before replacing a file you may need later.
Why can I still see the old file?
The version parameter only helps when a URL passes through supported WordPress filters and the cache distinguishes it. Refresh the page and check the relevant browser, page cache, CDN or exported page.