Jetpack 101

How to Upload and Embed a PDF in WordPress: Step-by-Step Guide

symbols representing documents overlaying a computer

Do you want to use an eBook as a lead magnet for your email list? Add a printable worksheet to your resource library? Share a checklist with readers? All of these are excellent examples of times that you need to add a PDF to your site.

This detailed guide explains how you can easily upload, manage, and embed PDFs in WordPress. Let’s get started! 

Reasons to upload PDFs in WordPress

PDFs are clear, professional-looking documents that retain formatting across all devices and platforms. They make it easy for your audience to download and save resources that they want to access in the future or print at their home. 

Here are some types of PDFs you can create:

  • Downloadable content that you can offer in exchange for an email signup or as part of a resource library membership
  • Detailed guides or manuals that readers can print and reference at a later time
  • Brochures or flyers that your team or audience can use for marketing purposes
  • Secure or protected documents — e.g. registration forms for patients to fill out prior to their appointment
  • Maps to guide event attendees when they arrive

How to upload a PDF to WordPress

Ready to upload? Follow these instructions.

  1. Log in to your WordPress dashboard. 
  2. Click on Media → Library.
  3. Drag and drop your PDF file onto the screen, then allow it to upload

And that’s it! Your PDF is now saved in your website’s Media Library.

How to add a PDF to a WordPress post or page

Once your PDF is uploaded, you can add it to a page or post to make it accessible to site visitors. Here are two ways to do so:

Use the block editor

  1. Open your post or page where you want to embed the PDF.
  2. Click the + button to add a new block.
  3. Search for and select the File block.
  4. Click Media Library, then choose your uploaded PDF. After selecting, click Insert.
  5. Select the File block and use the Settings in the right sidebar to make customizations. 
  6. Enable Show inline embed under PDF settings.
  7. (Optional) Adjust Height in pixels to control the embed size.
  8. Save your page or post.
adding a file block in WordPress

The PDF now appears directly within your content, ready for visitors to view or download.

Use the classic editor

  1. Navigate to your post or page.
  2. Click the Add Media button above the text editor.
  3. Choose your PDF from the Media Library.
  4. Click Insert into post.

Alternative methods to embed PDFs in WordPress

Sometimes you might need additional functionality for displaying PDFs. Here are a few additional options:

1. Embedding PDF files with plugins

Here are two plugins that offer additional PDF functionality: 

  • PDF Embedder: Allows for PDF embedding with adjustable viewer size and download options
  • EmbedPress: Embeds various documents, including PDFs, with an interactive viewer

Let’s walk through some instructions for adding a PDF with the PDF Embedder plugin:

  1. Go to PluginsAdd new plugin in your dashboard.
  2. Search for PDF Embedder.
  3. Install and activate the plugin.
  4. Configure settings in Settings → PDF Embedder.
  5. To embed, select Add Block in Gutenberg and search for PDF Embedder.
  6. Select your PDF file from your media library.

2. Embedding PDFs using Google Drive

You can also use Google Drive to embed PDFs with extensive sharing and viewing capabilities. Here’s how:

  1. Upload the PDF to your Google Drive account.
  2. Right-click the file and select Get link.
  3. Change permissions to Anyone with the link.
  4. Click Done, then right-click again and select Preview.
  5. Select More actions (three dots) and click Embed item.
  6. Copy the embed code.
  7. Paste this embed code directly into your WordPress page or post using the HTML block.

Tips for optimizing PDF usage in WordPress

Here are a few tips for making the most of your PDFs:

1. Name your PDF like a URL slug (and keep it stable)

Use a descriptive filename (e.g., 2025-event-checklist.pdf, not final-v7.pdf). Changing the filename later changes the URL and breaks links/shares.

2. Decide whether the PDF should be indexed

If your PDF is a lead magnet or private resource, consider preventing indexing and only promote a landing page. If it’s meant to rank, ensure the PDF contains selectable text, a clear title, and is internally linked from relevant pages.

3. Avoid thin “attachment pages”

WordPress can generate attachment pages for media. If those pages are indexable, they can create duplicates/thin pages. Set attachment pages to redirect or noindex via your SEO plugin settings.

4. Protect Core Web Vitals

Inline PDF embeds can add weight and slow interaction. Prefer:

  • A short preview + Download button
  • Lazy-loaded iframes (loading="lazy")
  • Compressed PDFs (especially if image-heavy)

If you embed PDFs regularly, site speed and uptime matter. A free plugin like Jetpack Boost that improves Core Web Vitals and optimizes media delivery can indirectly improve user experience for document-heavy pages.

The best method for speed: The image link trick

Embedding a full PDF loads a massive file every time the page opens, hurting your Core Web Vitals.

A smarter approach is to upload a screenshot of the PDF’s cover page as an Image Block, and link that image to the PDF file URL. This loads instantly on all devices and saves server bandwidth.

Explore the benefits of Jetpack

Learn how Jetpack can help you protect, speed up, and grow your WordPress site. Get up to 50% off your first year.

Explore plans

Troubleshooting common issues

Sometimes, you may face issues embedding PDFs. Here are some common problems and their solutions:

PDF fails to upload

  • Check your file size limits in Media → Add New.
  • Increase the maximum upload size via your hosting settings or contact your provider.

PDF not displaying correctly

  • Verify compatibility of the PDF viewer or plugin.
  • Re-upload the PDF and try again.

PDF viewer performance issues

  • Reduce PDF file size for faster loading.
  • Use reputable plugins like PDF Embedder.

Best practices for PDF accessibility

Make PDFs accessible to everyone by following these practices:

  • Ensure clear structure and tags in your PDFs to help screen readers.
  • Provide descriptive alt text for images within your PDFs.
  • Maintain high contrast between text and background colors.

Accessibility ensures that all visitors can effectively access and understand your documents.

Frequently asked questions

How do I reduce the file size of my PDF so it uploads faster?

Large files are a major problem for website speed. If your file is too big it might fail to upload entirely or take a long time to load for your visitors. You should always compress your document before you put it on your website. You do not need expensive software to do this.

There are free tools online that can shrink your file size without making the text look blurry. You simply upload your large file to the tool and it gives you back a smaller version. Aim to keep your file size under one or two megabytes if possible. This ensures your website stays fast and your visitors do not get frustrated waiting for the content to appear.

Can I edit the text in my PDF after I upload it to WordPress?

You cannot change the words or pictures in your document inside WordPress. WordPress is a tool for managing your website content but it is not a document editor.

If you find a spelling mistake or need to update a number you must fix the original file on your computer first. Open the document in the software you used to create it and make your changes there. Once you save the new version you must upload it to WordPress again. You can then replace the old file with the new one. Some plugins let you replace a file without breaking the link but usually you have to do it manually.

How do I make my PDF open in a new browser tab?

It is a smart idea to open documents in a new tab so visitors do not lose their place on your website. When they close the document your website will still be open underneath. You can set this up easily when you add the link. Click on the link to your file and look for the link settings menu. You will see a small switch or box that says “Open in new tab.” Turn this on.

If you are using an image to link to the file the process is the same. Click the image then click the link icon and select the new tab option. This small change improves the experience for your users and keeps them on your site longer.

Why do I get an error message when I try to upload my PDF?

The most common reason for an upload error is that your file is too big. WordPress places a strict limit on the size of files you can upload to keep your server safe. This limit is often set to a low number like two megabytes or eight megabytes by your hosting company. If your file is bigger than that limit the upload will fail immediately.

You can fix this by compressing your file to make it smaller. If it is still too big you can ask your hosting company to increase your upload limit. Sometimes the error happens because the file name has strange characters in it. Try renaming the file to something simple with only letters and numbers.

Why does my embedded PDF show a gray box or download link on mobile?

Mobile browsers can sometimes struggle to display these files directly on a webpage. Some mobile devices may prioritize saving data and battery power. This means they often block large file previews from loading automatically. When this happens your visitors might see an empty gray space or a simple text link instead of your document. The native file block in WordPress relies on the visitor’s browser to do the work. If the browser says no the embed fails.

The most reliable fix is to use a specialized plugin that forces the document to display. Alternatively you can upload an image of the document’s cover page and link it to the file. This ensures every visitor can access your content no matter what device they use.

Is a PDF accessible for people using screen readers?

Many documents are not easy for screen readers to understand. A screen reader is a tool that reads text out loud for people who cannot see well. If your document is just a picture of text the screen reader will be silent. This is very bad for accessibility.

To fix this you must create your document correctly from the start. You need to use proper headings and defined paragraphs in your original writing software. You also need to add descriptions to any images inside the document. Even with these steps a regular web page is always more accessible than a separate file. Only use a file if you absolutely have to.

This entry was posted in WordPress Tutorials. Bookmark the permalink.
WordPress Tutorials

Jen Swisher profile

Jen Swisher

Jen is a Customer Experience Specialist for Jetpack. She has been working with WordPress and Jetpack for over a decade. Before starting at Automattic, Jen helped small businesses, local non-profits, and Fortune 50 companies create engaging web experiences for their customers. She is passionate about teaching others how to create on the web without fear.

Explore the benefits of Jetpack

Learn how Jetpack can help you protect, speed up, and grow your WordPress site. Get up to 50% off your first year.

Explore plans

Have a question?

Comments are closed for this article, but we're still here to help! Visit the support forum and we'll be happy to answer any questions.

View support forum