A broken PDF download on a WordPress site can cost a business an enquiry even when the page itself looks fine. The visitor clicks a brochure, menu, specification sheet, or guide and gets a 404, a blank preview, an access message, or the wrong file. First find out which of those actually happened. Replacing the PDF without checking the link may leave the same problem in place.
Start with a copy of the exact button or text-link URL from the published page. Open that URL in a private browser window without signing in. Do not upload a confidential document to the public Media Library merely to run this test. If the document is meant to be private, keep its access rule in place and test with an authorized account instead.
First separate the link, file, viewer, and access rule
These failures look similar to a visitor but belong to different owners. Test the published link and the direct file URL separately. In Media > Library, open the PDF’s details and copy its File URL. WordPress distinguishes that direct file URL from an attachment page; its Edit Media documentation shows where to find it.
| What the visitor sees | Compare next | Likely repair owner |
|---|---|---|
| The published link fails, but the direct file URL opens. | Compare the link destination with the Media Library File URL, including the complete path and filename. | The page or button editor. Correct that one link, then test the public page again. |
| Both links return 404. | Confirm the file still exists in the Media Library and that its current URL is the one you tested. | Media storage, a migration, or file-serving configuration may need investigation. Do not delete the old attachment yet. |
| The file opens directly, but an inline preview is blank. | Try the direct file in another browser and compare the page’s embed with a simple file link. | The viewer or embed layer is the first suspect; the PDF itself may still be available. |
| A public visitor gets an access page, 403, or login prompt. | Check whether the download is deliberately gated and whether the test account should have access. | The membership, file-protection, CDN, or hosting access rule needs its owner; do not bypass the rule to make the link work. |
| The PDF opens in a browser instead of saving automatically. | Check whether the page offers a separate Download button and whether the file is otherwise usable. | This can be normal browser behavior, not a broken file. Decide which visitor action the page needs. |
A 404 here is not automatically the same as every page on the site returning 404. Our WordPress page-404 guide handles page routing. A PDF may instead be missing from uploads, linked with an old domain or path, or served through a separate protected-download system.
If the direct file works, repair the published link
Open the page editor and inspect the exact link attached to the text, image, or button. Compare it with the Media Library File URL. After a migration or replacement, the old URL may still point to a former hostname, a moved upload path, a deleted attachment page, or a temporary admin link. WordPress’s Link control guide explains how to edit a link and notes that validating the URL’s format does not prove the destination exists.
Change only the affected link, then update the page and test it while signed out. If the page builder or download plugin creates the link dynamically, record the field or rule that produced it rather than pasting a new URL over a generated control. Several buttons may share the same source.
Do not turn a restricted document into a public Media Library link to make a customer test pass. If the brochure, invoice, or account file needs access control, the right fix is to repair the protected delivery path and verify it with the right user role.
If the file URL fails, preserve evidence before replacing it
Find the attachment by filename in Media Library and note its File URL, upload date, and where the business links to it. A file entry in WordPress and the bytes delivered to a visitor are separate checks. If the URL fails, ask the host or developer whether the physical upload exists, whether a storage or CDN migration changed its location, and what response the file request returns.
Keep a copy of the original document and a current site backup before changing attachments. Re-uploading with a different filename may create a new URL while old buttons, email templates, QR codes, or indexed links still point to the previous one. A redirect might be appropriate for a public brochure, but it must not expose a private file or conceal an unresolved access rule.
If WordPress never accepted the file in the first place, that is an upload problem rather than a download problem. Follow the checks in our media-upload error guide for the save-versus-processing distinction, but do not assume an image-specific cause applies to a PDF.
When a preview is blank, test the file without the viewer
WordPress’s File block documentation separates a link to the media file or attachment page, the optional Download button, and an inline PDF embed. That is a useful model even if your site uses Elementor or another builder. A blank embed does not by itself prove the file is gone.
Open the direct file URL in a fresh tab. If the document renders there, keep a working file link available while the embed is investigated. Test the public page on desktop and mobile. Some browsers display PDFs in a tab; others offer a download. The success condition is that the visitor can get the intended document, not that every browser uses an identical animation or button.
Verify the business journey, not just the status code
A successful response can still deliver an old version or the wrong document. Before calling the issue fixed, record a short comparison:
| Check | Pass condition | Stop or escalate when |
|---|---|---|
| Public link | The exact published button reaches the intended document while signed out, if the document is public. | The link works only for administrators or goes to an old domain. |
| File identity | The document opens, has the expected title/pages, and matches the approved current version. | A different or obsolete file is delivered despite a successful response. |
| Protected access | An authorized user can reach the file and an unauthorized user cannot. | The fix exposes private content or blocks valid customers. |
| Mobile action | The file can be opened or saved from the mobile page without a broken overlay. | The viewer hides the download control or never loads. |
| Other entry points | Relevant emails, QR codes, campaign pages, and older buttons still lead to the right version. | Only the one page you edited works. |
When several entry points or access rules are involved, the job is no longer a one-link edit. A WordPress developer can trace where the URLs are generated, protect any gated files, correct the delivery path, and test the real visitor journey. Send the affected public URL, expected file name, what each test returned, and whether the file is meant to be public. Do not send credentials or private documents through a general contact form.
For a site with custom buttons, protected files, or a migration history, Webless WordPress development is the relevant service path. If the problem is part of a wider broken site, the repair-help guide explains how to route the symptom without paying for the wrong fix.