Unlimited Wordpress themes, plugins, graphics & courses! Unlimited asset downloads! From \$16.50/m

Difficulty:BeginnerLength:ShortLanguages:

In this tutorial you’ll learn how to upload or link a PDF file to WordPress. If you’ve ever uploaded an image to the media library in WordPress, doing the same with a PDF is just as straightforward, so let me explain how to do that.

## 1. Locate Your PDF File

I’m working with a demo PDF file on my system. Make sure the file size isn’t too big (your PHP hosting will likely have a limit on file upload sizes) and ideally your file’s filename shouldn’t contain any strange characters either.

In your WordPress admin go to Media > Library > Add New then use the file chooser to select your PDF, or drag and drop it into the browser:

Once uploaded you’ll be able to give the file a title, a caption, and a description (if you want). And that’s how to upload a PDF to WordPress! Now let’s see a few ways we can link to the PDF.

## 2. Copy and Paste the PDF File Link

Most importantly you’ll need the link to the file, so copy the whole path as you see it displayed:

You can then use that link and attach it to text in pages or posts within WordPress, by highlighting your chosen link text and adding a link like so:

Once saved, when you view the post on the front end of your website, the link will be present and when clicked will open your PDF in a browser window.

### Linking From Images and Buttons

The same thing is possible with images and buttons. For example, upload an image to the WordPress Gutenberg editor, then click the link icon to add the PDF link:

## 3. Using the Classic WordPress Post Editor

What if you’re not using Gutenberg? The same is possible using the Classic WordPress editor too—the link button is found in the toolbar at the top of the editor:

And that’s how you link to a PDF in WordPress! But wait, there’s one more thing I want to explain..

Before we wrap things up, here’s an additional trick. What if you don’t want users to click your PDF link and open the PDF in another browser window? What if, instead, you’d like the PDF to directly download?

To achieve this, we need access to the HTML markup of the link itself. So in the Classic Editor switch to the text tab:

In the Gutenberg editor you can gain access to the HTML code by clicking the three dots (options) menu like so, and hitting Edit as HTML:

Then (if you’re familiar with reading HTML code) find the link in question, which should look something like this:

Then add the download attribute, anywhere within the main anchor tag, like this: