• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

WP Thinker

The WordPress Playground

  • Snippets
  • Best
  • Guides
  • Reviews
Home / Guides

May 5, 2021 Milan

How to Upload and Link to PDF in WordPress

How to Upload and Link to PDF in WordPress

Seeking instructions to upload and link PDF files in WordPress? Can we assume you’re trying to post longer guides or simply PDF versions of existing WordPress pages and posts? No? Did you begin marketing and need to build a mailing list by offering free eBooks in exchange for an e-mail address? If that isn’t it, it could only be that you’re looking to boost engagement by offering free downloads? Are you perhaps trying to monetize members-only content? Whatever the case may be, the process is identical. Here’s how to upload and link to PDF in WordPress.

1. Upload PDF file in WordPress

PDF files can be uploaded to WordPress like this:

  1. Access your WordPress Admin Section.
  2. Click on Media, then Library in the left sidebar.
  3. Click on Add New in the upper left corner.
  4. You can now proceed in 2 ways:
    1. Drag and drop the PDF file onto the marked area.
    2. Click on Select Files, locate your PDF file, and click on Open.
  5. If everything is in order, you can see the PDF file in the Media Library without a thumbnail.
  6. Click on the file, then highlight (triple-click) and copy the full link (under URL or Copy Link).

2. Link to PDF file in WordPress

Opening the link in a new tab is optional, but strongly recommended. This will significantly reduce the bounce rate of your post or page. With that said, here are 2 ways to link to PDF in WordPress:

1. Block Editor

If you’re using Block Editor, add a new block and then:

  1. Come up with an appropriate word or sentence. For example, Get this PDF. Highlight what you wrote by triple-clicking.
  2. Click on the Link button (paperclip icon) from the toolbar above or press Control (Ctrl) + K (Windows, Linux) or Command + K (Mac).
  3. Paste the full link you copied into the empty text field.
  4. Toggle the Open in New Tab option to On.
  5. Click on the Enter button to confirm.

2. Classic Editor

Here’s how PDF linking works in the Classic Editor:

  1. Same as step 1 above.
  2. Use the keyboard shortcuts mentioned above or click on the Insert/edit link option (paperclip icon) in the toolbar at the top.
  3. Identical to step 3 above.
  4. Click on the cogwheel (gear) icon.
  5. Put a checkmark in front of the Open link in a new tab option.
  6. Click on Add Link.

3. Create an automatic download link for PDF in WordPress (Optional)

Your visitors can right-click on the link, and select Save as… to save the file to their computer. Alternatively, they can click on Save (floppy disk icon) when the PDF file opens in a new tab. The problem is that not all users know this, which will hurt your download numbers. To combat that, we suggest you convert the PDF link into an automatic download link like this:

1. Switch to HTML view

Do this to view your post or page as HTML:

1. Classic Editor

Click on Text in the upper right corner. Find your download link using the search function Control (Ctrl) + F (Windows and Linux) or Command + F (Mac).

2. Block Editor

Click on the paragraph block, then the 3-dot icon in the toolbar above. Select Edit as HTML from the drop-down menu.

2. Modify the PDF link

In both cases, the link will look like this:

<a href="https://.../file-name.pdf" target="_blank">Get this PDF</a>

You can change it in one of 2 ways now:

1. Add download attribute only

Simply add “download” before the closing bracket so that it looks like this:

<a href="https://.../file-name.pdf" target="_blank" download>Get this PDF</a>

2. Add download attribute and filename

While it works, the file downloaded with the method above will inherit the name from your Media Library. In the example above, it will be named file-name.pdf. This isn’t ideal from a marketing perspective. So, we suggest defining your own filename like this:

<a href="https://.../file-name.pdf" target="_blank" download="File Name Goes Here.pdf">Get this PDF</a>

Important. Don’t forget to add an extension (.pdf) at the end.

3. Switch back to Visual view

To test the changes you made, do this to convert your post or page to Visual view:

1. Classic Editor

Click on Visual in the upper right corner.

2. Block Editor

Select the paragraph block, click the 3-dot icon, then Edit visually.

Avatar for Milan

Milan

A WordPress lover and blogger. Have been writing about WordPress for the past few years and loves sharing his knowledge and findings to those who need help.

Primary Sidebar

Related Articles

Footer

WP Thinker is a website that publishes everything related to WordPress, Plugins, Themes, SEO, Blogging, etc.

  • Facebook
  • Twitter
  • Pinterest

Copyright © 2023 · WP Thinker

  • About Us
  • Advertise
  • Write for Us
  • Privacy Policy
  • Terms and Conditions
  • Contact Us
This website uses cookies to serve you better. By continuing to use this website, you agree to our cookie and Privacy Policy.