Upload a PDF to WordPress and link to it

  • media
  • pdf
  • links
  • buttons

Updated

To add a PDF to a WordPress page, upload it under Media → Add Media File, copy its URL, then link a button or some text to that URL. Visitors click to open or download the file.

You have three ways to put a PDF on a page:

Option What visitors see Best for
A button A call to action, like Download the brochure One important file
A text link Linked words inside a paragraph A file mentioned in passing
A File block The file name, a Download button, and optionally the PDF shown on the page A file people should read without leaving the page

Upload the PDF to the media library

  1. Go to Media → Add Media File.
  2. Drag the PDF onto the page, or click Select Files.
  3. Open the file in the library.
  4. Click Copy URL to clipboard.

You can also upload from inside a page with a File block, or from the media window when you set a button link.

Give the file a clear name before you upload it (2026-program.pdf, not scan0042.pdf). The name shows in its web address, and WordPress uses it as the file's title in the library.

Link to the PDF from a button

  1. Edit the page.
  2. Add a Buttons block and type the label, like Download the brochure.
  3. Open the button's link control and paste the PDF link. You can also search for the file by name if it shows up in the results.
  4. Click Save.

The link box searches your media library as well as your pages, so typing the PDF's title is often quicker than pasting the URL.

Link to the PDF from text

  1. Highlight the words to link.
  2. Click the link icon in the toolbar.
  3. Paste the PDF link and press Enter.
  4. Click Save.

To open the PDF in a new browser tab, edit the link and turn on Open in new tab.

Show the PDF on the page with the File block

  1. Edit the page and add a File block.
  2. Click Upload, or Media Library to pick a PDF you've already uploaded.
  3. In the block sidebar, choose your settings:
    • Show inline embed shows the PDF in a scrolling frame on the page. Height in pixels sets how tall that frame is.
    • Show download button adds a Download button next to the file name.
    • Link to sends the file name to the Media file (the PDF itself) or its Attachment page. Choose Media file.
    • Open in new tab opens the PDF in a new tab when someone clicks the file name.
  4. Click Save.

Most phone and tablet browsers won't show an embedded PDF, so visitors on phones see only the file name and the button. Keep the download button on.

Tips

  • Keep PDFs small. Large files are slow to open on phones.
  • Use a label that says what the file is ("2026 program PDF"), not "click here."
  • A replacement PDF usually gets a new link. After you upload a new version, update your buttons and text links.
  • For a file you replace often, like a menu or a price list, link to a short address such as /menu-pdf and redirect it to the current PDF. Each time you upload a new version, change only the redirect.
  • If the PDF is the only place some information lives, consider putting the key details on the page as text too. Pages are easier to read on a phone and easier for search engines and screen readers to use.

If it doesn't work

  • "exceeds the maximum upload size for this site": your host sets the limit, shown as Maximum upload file size under Media → Add Media File. Make the PDF smaller (most PDF tools have a "reduce file size" or "optimize" option) or ask your host to raise the limit.
  • The link downloads the file instead of opening it: that's the visitor's browser setting. You can't control it from WordPress.
  • Visitors still see the old PDF: you probably uploaded the new version as a new file, so it has a new link. Update the links on the page. If the address is the same, see Fix WordPress changes not showing on your site.
  • You can't find the file: search the library by its title, or switch the library's type filter to documents. See Use the Media Library.

If your site runs on Dirigible

With Dirigible Optimize active, big PDFs are compressed for you. A PDF of 10 MB or more is compressed in the background a minute or two after upload, and keeps the same link. For a smaller one over 1 MB, open it in the media library and click Compress PDF. See Images in the Optimize docs for which PDFs are left alone.

Built by Dirigible Studio. Get in touch