Setup & site building · Guide
How to Upload and Embed a PDF in WordPress

Short answer
To add a PDF to WordPress, add a File block to a page or post, upload the PDF or pick it from the Media Library, and publish. Turn on Show inline embed in the block settings to show the PDF on the page, or leave it off and keep the Download button for a simple download link. Replace the file with the block's Replace button when a new version arrives.
Key takeaways
- The File block adds a PDF link or embed with no plugin, using /file in the editor.
- WordPress accepts PDF files by default, and the Media Add New screen shows your upload size limit.
- Show inline embed displays the PDF on the page, with a height setting in pixels.
- Only Administrators, Editors and Authors can upload a file with the File block by default.
- PDF Embedder adds Next, Previous and zoom controls, but its free version has no download button.
What is the fastest way to add a PDF to WordPress?
Add a File block to a page or post, upload the PDF or pick it from the Media Library, and publish.
The File block is built into WordPress, so no plugin is needed for a simple PDF link or embed. WordPress.org documentation states that the File block lets you add a link to downloadable files on your site.
Follow these steps:
- Open the page or post in the block editor.
- Type
/fileon an empty line and press Enter, or click the block inserter (+) and search for “File”. - Click Upload to add a PDF from your computer, or click Media Library to pick one already uploaded.
- Click the file name text and replace it with a clear title, such as “Download the 2026 price list (PDF)”.
- Click Publish or Update.
The File block shows the file name with a Download button by default. That is enough for most sites: a menu, a price list, a report or a form that visitors need as a file.
How do you upload a PDF to the Media Library?
Go to Media, then Add New, and drag the PDF into the upload area, or click Select Files and pick it from your computer.
WordPress accepts PDF files by default. The allowed document types include .pdf, .doc, .ppt, .odt and .xls, as listed in the Kinsta knowledge base, which lists .pdf among the documents WordPress accepts without extra setup.
Uploading through Media, then Add New, stores the file before you place it on a page. That suits files you reuse, such as a brochure linked from several pages. Uploading through the File block stores it at the same time as you place it, which suits a file used once.
Check the limit before you upload a large file. The Media, then Add New screen shows a “Maximum upload file size” line under the upload area, and that number is the limit your host sets.
If the PDF is larger, the upload fails. The guide to fixing an upload limit that is too small shows how to raise it.
How do you embed a PDF so visitors read it on the page?
Add the PDF with a File block, then turn on “Show inline embed” in the block settings and set the height in pixels.
An inline embed shows the PDF inside the page, so visitors read it without leaving or downloading. WordPress.org documentation states that you can embed a PDF on your page or post by enabling the “Show inline embed” option, and that the height setting lets you adjust the display in pixels.
Follow these steps:
- Add the PDF with a File block, as above.
- Select the block and open the Settings panel on the right.
- Find the PDF settings section and turn on “Show inline embed”.
- Set the height, for example 600 px for a short document or 900 px for a long one.
- Preview the page at desktop and phone widths, then publish.
The embed uses the visitor's browser to show the PDF, so the look varies a little between browsers. Keep the height generous: a short viewer forces readers to scroll inside a small box, which is the most common complaint with embedded PDFs.
How do you offer a PDF as a download link instead?
Leave “Show inline embed” off, keep the Download button on, and set the link to open the media file directly.
A download link suits files readers keep, such as forms, tickets and price lists. The File block gives you three choices in its settings, as described in WordPress.org documentation:
- Link to the media file, which opens the PDF itself.
- Link to the attachment page, which opens a WordPress page about the file.
- Turn “Open in a new tab” on, so the PDF does not replace your page.
The Download button can be toggled on or off with the “Show download button” setting. WordPress.org documentation states that turning it off leaves the file name as a plain link. Keep the button on for files readers expect to save, since the label “Download” is clearer than a bare file name.
Write the link text as a description, not a file name. “Download the menu (PDF, 2 pages)” tells a reader what they get. “menu-final-v3.pdf” tells them nothing and looks unfinished.
How do you replace a PDF with a new version?
Select the File block, click Replace, and upload the new file, or pick it from the Media Library.
Replacing keeps the block and its settings, so you do not rebuild the page. WordPress.org documentation states that the Replace button lets you swap the file by uploading a new one or adding one from the Media Library.
Watch out for the file URL. When you replace a file in the block, the new file gets a new URL, and the old URL stops working.
Links to the old PDF from other pages, emails or printed material break. If the old URL matters, upload the new file through Media, then Add New, note its URL, and update the other links by hand.
The Copy URL button in the File block toolbar copies the current file URL to your clipboard. WordPress.org documentation states that clicking it copies the URL of the file, which is handy when you paste the link into an email or another page.
When should you use a PDF viewer plugin?
Use a viewer plugin when the built-in embed is not enough: you want page controls, zoom, clickable links inside the PDF, or a download button in the viewer toolbar.
The built-in File block shows the PDF and a download button, and that covers most cases. PDF Embedder adds a viewer with Next and Previous buttons to turn pages and zoom buttons for small text, as described on its WordPress.org plugin page.
Its viewer is served from your own server, not from a third-party service, and it resizes with the browser window.
The plugin's own instructions describe the block and shortcode routes. PDF Embedder instructions state that site-wide defaults such as width and toolbar position live under Settings, then PDF Embedder, and that single embeds can override them with block settings or shortcode attributes.
| Method | Viewer controls | Download button | Plugin needed |
|---|---|---|---|
| File block link | None, opens in browser | Yes | No |
| File block inline embed | Browser PDF controls | Yes | No |
| PDF Embedder block | Next, Previous, zoom | Premium only | Yes |
| PDF Embedder shortcode | Next, Previous, zoom | Premium only | Yes |
The free version of PDF Embedder has no download button, as stated on its WordPress.org plugin page. If readers must download the file from the viewer, use the File block instead, or check the premium features first.
What if the PDF upload fails?
Read the error message, check the file size against the limit on Media, then Add New, and check the file type.
Three causes cover most failures:
- The file is larger than the upload limit. The Media, then Add New screen shows the maximum size your host allows. The guide to fixing the “uploaded file exceeds the upload max filesize” error explains the PHP settings behind that number.
- The file type is blocked. PDF is allowed by default, but a file saved with a strange extension is not. WordPress builds the allowed list with
get_allowed_mime_types(), which removes.exeand.swffor everyone, as documented by Developer.WordPress.org. Re-save the file with a .pdf extension and try again. - The upload stops halfway. A slow connection or a very large file can time out. Try a smaller file, or upload it through your host file manager and then add it from the Media Library.
Only Administrators, Editors and Authors can upload a file with the File block by default, as stated in WordPress.org documentation. A Contributor who sees an error may simply lack the permission, not face a broken upload.
If the Media Library itself will not load, the problem is wider than the PDF. The guide to fixing a Media Library that does not load covers the plugin and memory checks to run.
How do you make a PDF link clear and useful?
Give the file a plain name, write link text that says what the file is, and test the link while logged out.
A good PDF link answers three questions before the click: what the file is, how big it is, and what happens on click. “Download the 2026 catalogue (PDF)” answers all three in a few words.
- Rename the file before upload. “price-list-2026.pdf” is clear; “Document1.pdf” is not.
- Put the file size in the link text when the file is large, so mobile readers know what they download.
- Say when the file opens in a new tab, or turn that setting off and let readers use the back button.
- Test the link in a private window while logged out. An admin sees files a visitor cannot, so a logged-in check can hide a permission problem.
Keep the number of PDFs on one page low. A page with ten PDF links and no summary text helps nobody. Put the key facts in the page text, and link the PDF as the full detail.
What mistakes should you avoid?
Do not upload scanned image PDFs when text would do, do not hide the file behind a vague link, and do not treat a PDF as a web page.
- Do not upload a scanned image as a PDF when the content is text. Search engines and screen readers cannot read the words in an image, and the file is far larger than a page.
- Do not link a PDF with the words “click here”. The link text should name the file.
- Do not upload a PDF and forget it. Prices, dates and phone numbers in a PDF go stale just like page text, and nobody sees a stale PDF until a reader complains.
- Do not use a PDF for content that changes often. A page is easier to update, and its changes show in search results.
- Do not set the file permissions wrong. The guide to setting correct file permissions in WordPress covers the values that keep uploads readable without opening the site to abuse.
A PDF is a file, not a page. Use it when readers need to print, save or share the exact document, and use a page when the content should be read on screen.
Frequently asked questions
Why does my PDF upload fail in WordPress?
Check the file size against the limit shown on the Media, then Add New screen, since that number is the limit your host sets. If the file is larger, raise the limit or shrink the PDF. If the size is fine, check the extension: PDF is allowed by default, but a file saved with a strange extension is blocked.
How do I show a PDF on the page instead of a download link?
Turn on Show inline embed in the File block settings and set a height in pixels, such as 600 px for a short document. The embed uses the visitor's browser to show the PDF, so the look varies a little between browsers. If the viewer looks cramped, raise the height rather than shrinking the page text around it.
How do I replace a PDF with a new version?
Select the File block and click Replace, then upload the new file or pick it from the Media Library. The block and its settings stay the same, but the new file gets a new URL, so update any other links to the old PDF on other pages, in emails or in printed material.
Can visitors find my PDF through WordPress search?
No. Default WordPress search looks at post titles, excerpts and content only, so the text inside a PDF is not searched. If the content matters for search, put the key facts in the page text as well and link the PDF as the full detail, rather than hiding the only copy inside the file.
Should I tell readers the file size before they click?
Yes, if the file is large or the reader is on a phone. Put the file size in the link text when the PDF is big, and write link text that says what the file is, such as Download the 2026 price list (PDF). A clear label beats a bare file name every time.
Sources
- File block WordPress.org
- PDF Embedder WordPress.org
- PDF Embedder instructions PDF Embedder
- get_allowed_mime_types() Developer.WordPress.org
- Sorry, this file type is not permitted for security reasons Kinsta
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


