Replace a PDF in WordPress without breaking links

How to replace a PDF in WordPress without breaking links

You published a PDF months ago: a policy, a price list, a form. It’s linked from pages on your site, from emails, maybe from a printed QR code. Now it needs updating, and that’s where WordPress gets awkward.

Upload the new file to the Media Library and WordPress gives it a new address. Every existing link still points at the old version, and visitors keep downloading out-of-date information without knowing it.

Here are three ways to update a PDF and keep your links working, and when each one makes sense.

Why WordPress gives the new file a different address

The Media Library treats every upload as a separate file. If a file with the same name already exists, WordPress adds a number to the new one, so price-list.pdf becomes price-list-1.pdf. By default, uploads are also filed into year and month folders, so a file uploaded in October lives at a different address from one uploaded in September, even with an identical name.

Either way, the address changes, and the links you already shared don’t.

Option 1: Delete the old file and re-upload with the same name

The manual fix is to delete the old file permanently, then upload the new one with exactly the same filename.

It works, but it’s fragile:

  • If the upload lands in a different month folder, the address still changes.
  • There’s a gap between deleting and uploading where the link is broken.
  • Page caches and CDNs may keep serving the old file until they are cleared.
  • The old version is gone. If someone asks what the document said last month, you can’t show them.

Option 2: Use a media replace plugin

Plugins such as Enable Media Replace let you swap the file behind an existing Media Library item, keeping the same address. For images and one-off files this is a good fix.

For documents people rely on, there are gaps. The previous file is overwritten, so there is no version history and no record of who changed what or why. And like everything in the Media Library, the file stays publicly downloadable from its /wp-content/uploads/ address.

Option 3: Manage the PDF as a document with version history

A document management plugin gives each document a permanent link that always serves the latest version, and keeps the old versions behind it. This is what we built DocVault to do.

Each document gets a link like /trdv/download/123/. When you upload a new version, that same link starts serving the new file straight away. The previous versions stay in the document’s version history with their filename, size, upload date, who uploaded them, and any notes you added. If you need to go back, restore an earlier version with one click.

Setting it up

  1. Install DocVault from WordPress.org and activate it. A Documents menu appears in your admin sidebar.
  2. Go to Documents → Add New and drag your PDF onto the upload area. The title is filled in from the filename, and you can edit it.
  3. Add version notes if you like (for example, “2026 prices”), then click Publish.
  4. Link to the document using the DocVault block, an inline link such as [trdv_link id="123"]Download the price list[/trdv_link], or a searchable list of documents with [trdv_list].

Updating it later

  1. Open the document from the Documents list.
  2. Drag the new file into the Upload New Version area and add a note about what changed.
  3. Click Update. Every link to the document now serves the new file.

The free plugin keeps the last five versions of each document. DocVault Pro keeps unlimited versions, and records who changed what in an audit trail.

What about PDFs already in your Media Library?

Moving a document into DocVault gives it a new, permanent link, so links to the old /wp-content/uploads/ address won’t update on their own. Update those links once, or add a redirect from the old address to the new one with your SEO or redirection plugin. After that, you never have to change them again.

Which option should you use?

  • A one-off file that rarely changes: a media replace plugin is fine.
  • Documents that are updated regularly, or where you need to know what changed and when: use a document manager with version history.
  • Documents that should only be available to some people: a document manager also handles access control and blocks direct file access, which the Media Library can’t do.

DocVault is free on WordPress.org and takes a couple of minutes to set up.