WP Manifestindependent plugin directory
manifest / media / wp-replace-media

WP Replace Media

Replace attachment files in-place while keeping URLs and thumbnails intact.

by Chandra Patel · github.com/chandrapatel/wp-replace-media · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/chandrapatel/wp-replace-media/archive/refs/heads/main.zip

Declares an update source (https://github.com/chandrapatel/wp-replace-media), so updates arrive through the plugin's own updater.

From the readme

WP Replace Media - Contributors: chandrapatel - Tags: media, replace, attachments, thumbnails, revisions, backup, restore, cache-busting, cdn - Requires at least: 6.0 - Tested up to: 6.7 - Requires PHP: 8.0 - Stable tag: 1.0.0 - License: GPLv2 or later - License URI: Description Replace attachment files in-place while keeping URLs stable. WP Replace Media adds a Replace entry point in the Media Library list view, attachment edit screen, and grid view modal, opens a dedicated tabbed Replace screen, enforces MIME type consistency, writes the new file over the existing path using the WordPress Filesystem API, regenerates image metadata and sub-sizes, updates attachment modified dates, and records a UTC replacement timestamp used as a ver query param for cache-busting on full and intermediate image URLs. Every replacement creates an automatic file backup, logged to a custom {prefix}wrmrevisions revisions table, viewable and restorable from a Revisions tab on the Replace screen. WPVIP edge cache is purged automatically; other CDNs can hook into the documented action to purge their own caches. Features - In-place replace — file path stays the same, URLs keep working. - Multiple en

Read the full README on GitHub →