WordPress Media

Why WordPress Adds “-1” to an Uploaded PDF Filename — and What to Do Instead

Quick answer

WordPress adds -1 to a filename when a file with that name already exists in the folder it is uploading to.

It does that on purpose: it will not silently overwrite something that is already there.

Which means if you are trying to replace an existing PDF and keep its link working, uploading another copy with the same name will never do it. You will end up with two files and every existing link still pointing at the old one.

What is actually happening

WordPress avoids filename clashes.

If this already exists:

employee-handbook.pdf

and you upload another file with the same name, you get something like:

employee-handbook-1.pdf

The exact suffix depends on what is already in that folder. Either way, it is a new file at a new address.

Why that breaks what you were trying to do

Say a page, an email or a QR code points at:

/wp-content/uploads/2025/05/employee-handbook.pdf

You upload the new version, and WordPress stores it as:

/wp-content/uploads/2026/09/employee-handbook-1.pdf

The original link does not follow it. You now have the old document still in circulation and a new one at an address nobody has.

That is perfectly sensible behavior if you meant to publish a new document. It is just not replacement.

Date folders make it worse

If your uploads are organised by year and month, a replacement uploaded months later lands in a completely different folder.

Original: /uploads/2025/05/application.pdf

New upload: /uploads/2026/09/application.pdf

Even with no -1 on the end, the address changed and every existing link still points at the old file.

The same filename does not mean the same document

Two departments can both send you a file called annual-report.pdf.

Matching names proves nothing about which page either belongs on. The question is always:

Is this a new version of something already on the site, or a new document in its own right?

When you want replacement

Replace when it is still the same document, the link should stay put, old links should keep working, and nothing else about the page changes.

For example: a corrected form, the current handbook, the current price sheet, the current product guide.

When you want a new upload

Upload as new when it is a new edition, the previous version should stay available, or it belongs in an archive.

For example: the 2026 Annual Report, September’s board minutes, Product Manual Rev D.

Why deleting the old one first is a bad idea

The obvious workaround is to delete the old PDF and upload the new one with the same name.

It usually causes more problems. Deleting removes the very thing your pages are pointing at, and between the delete and the upload every one of those links returns an error.

If keeping the link working is the goal, replacing is cleaner and does not have a gap in the middle.

Example: a corrected membership form

A membership form is linked from six pages and several old emails.

Somebody uploads the corrected version the normal way. WordPress stores it as membership-form-1.pdf.

The six pages and all those emails still point at membership-form.pdf, which is still the old version, and nothing about the Media Library suggests anything is wrong.

Replacing the file behind the existing document would have fixed all seven at once.

Now do that a hundred times

With one file this is easy to spot.

With 100, an ordinary upload gives you dozens of suffixed filenames, duplicate entries in the Media Library, no reliable way to tell which is current, and a cleanup job bigger than the original task.

That is why a batch needs to work out where every file is going before anything is uploaded into live content.

FAQ

Does WordPress always add -1?

No. Only when there is already a file with that name in the folder it is uploading to.

Can I just rename the new file?

You can, but that gives you a third filename and still leaves the original link pointing at the old document.

Could I overwrite it over FTP instead?

Yes, if you know the exact path and you are happy handling the backup and the undo yourself. It is a lower-level way of doing the same thing, with nothing recording what changed.

Does a replacement plugin always keep the URL?

Not in every possible setup — it depends on how that file is stored and served. Check the page and link you actually care about.

Summary

A -1 on the end is WordPress telling you it treated your upload as a new file.

If what you wanted was “keep the existing document, change the file behind it”, you need replacement rather than an upload.

Related: Replace PDF without breaking links · Date-based upload folders · Media Library bulk replacement