Directory / plugin

Versilink – Replace PDFs Without Breaking Links

v0.1.0 · by Mykyta Dudariev

Update a PDF or any Media Library file and keep the same URL: links you already shared open the new file, with version history and restore.

View on WordPress.org

About this plugin

When you update a price list, catalog or PDF guide, the links you already sent by email, in ads or on social media still point to the old copy. Uploading the new PDF gives it a new URL, and overwriting the file by hand loses the previous version. This plugin turns an existing Media Library file into a Document. Each new version you upload replaces the file at its current URL, so the links you already shared open the new content without changing anything, and earlier versions stay in the version history.

It is aimed at PDF price lists and guides, but works with any file type WordPress lets you upload, including DOCX and XLSX.

Features

  • Create a Document from any Media Library file.
  • Replace the file in place: its existing URL serves each new version.
  • Version history with an optional note per version. Users who manage the Document can download previous versions and restore (roll back to) any of them.
  • Previous versions are kept in a separate uploads folder under random file names and do not appear in the Media Library.
  • A short permanent link (/docs/your-document, prefix configurable) that always points to the current file. The plugin warns when the prefix clashes with an existing page, post type or taxonomy.
  • Media Library files that are Documents are marked, and other files get a “Create Document” action.

A note on caching

If your site uses a cache or a CDN, clear it after uploading a new version. Otherwise some visitors may still get the old file for a while.

Privacy

The current file is public, like any file in your Media Library. Use Versilink for documents you share openly, such as price lists and guides, not for private files.

Old versions are stored under random file names that cannot be guessed. On Apache they are also blocked by an .htaccess file; nginx ignores that file.

Plugin tags