Are you looking for an efficient and scalable way of uploading PDF files to WordPress and displaying them on your website? In this tutorial, I'll take you through a step-by-step guide on how to add PDFs to WordPress and display them in a searchable library on your site.
While WordPress itself provides ways to upload PDFs to WordPress, not everyone knows how to use them. The built-in methods are also only suitable for displaying on PDF file at a time.
For sites that need to upload multiple PDFs, it's better to install a plugin that provides better ways to add PDF files to WordPress and display them in a searchable format on the front end.
Keep reading to learn how to use the Document Library Pro plugin to build simple or extensive WordPress PDF libraries. You'll discover how to:
- Add PDF to WordPress either individually, via drag and drop, or via bulk upload from a CSV file.
- Create a searchable, filterable WordPress PDF library for your website visitors or team members.
- Structure PDFs into categories and tags for easy management.
- Enable version control for your uploaded PDFs.
- Store PDF files in the WordPress Media Library or on a third party system like Dropbox or Google Drive.
- I'll also tell you how to upload individual PDFs to WordPress without a plugin.
The end result will look something like this:
Before jumping into the step-by-step guide, let’s first answer this question:
Why upload PDFs to WordPress?
PDFs are the perfect format to share files with your website visitors. That's because they work on any device, unlike other formats like Word or PowerPoint. As a result, it makes perfect sense to add PDFs to WordPress and display them on your website.
When we talk about how to upload PDF to WordPress, we need to make it clear where the PDFs will be stored. There are two options for this:
- Upload PDFs to the WordPress Media Library. This means that they will be stored in the uploads folder of your main web hosting account.
- Add PDFs to a third party file hosting server such as Dropbox, OneDrive, Google Drive or Amazon S2. This is a good option if your PDFs are already hosted outside of WordPress, or if you don't have much space on your web hosting account.
The benefits of uploading PDFs to WordPress are the same wherever you store them behind the scenes. The instructions in this tutorial for managing and displaying PDF files will work for both methods.
The only consideration is that if the PDFs are hosted elsewhere, the users won’t be able to see them in a lightbox or the PDF viewer. Lightbox preview is only possible when you upload PDFs to the WordPress Media Library, so your users will have to download the PDFs instead.
How do I upload PDF files in WordPress?
Now we've discovered the benefits of uploading PDF's to WordPress and where to store them, I'll tell you how to do it from start to finish.
We'll do it using the Document Library Pro plugin. This robust WordPress PDF plugin comes with various features that can help you manage your PDF library in the most efficient way.
On top of making things more organized for admins, Document Library Pro gives you huge flexibility in how to list PDF files in the WordPress front end. You can choose from a structured table or an eye-catching grid layout for displaying the PDF's.
There are plenty of ways to structure the PDF library to make it easy to navigate. You can list the uploaded PDF's in a folder structure just like on your computer. The filter dropdowns and keyword search also make it easy to find PDFs in WordPress.
Here are some of the most useful benefits of the Document Library Pro plugin:
- 5 ways to upload PDF to WordPress - individually, selecting existing PDFs from the WordPress Media Library, drag and drop upload, bulk CSV upload, and via a front end PDF upload form.
- Along with PDF files, you can upload and manage other file formats such as jpegs, docs, gifs, PDFs, audio files, and dozens of other file formats.
- Manage all your documents (including WordPress PDFs) directly from your website's admin dashboard.
- Super flexible with 50+ customization options such as show/hide download button, links, document previews, and document download analytics.
- Let your customers sort, filter, and search the tables to locate the PDF file they are looking for in seconds.
Here’s a real-life case study on how Document Library Pro helped a company upload and display PDFs in WordPress.
Installing the Document Library Pro PDF plugin
Before you can start setting up Document Library Pro, you need to purchase and download it. You can then install it:
- In your WordPress admin dashboard, go to Plugins → Add New → Upload Plugin.
- Upload the .zip file you downloaded earlier and install it. After installation is completed, click on the Activate button.
- The plugin setup wizard will open automatically. Use this to activate your license key and choose the main settings for displaying your PDFs. There are lots of options, and here are the main ones to configure before uploading PDF files:
- Layout - You get two layouts to choose from, Table and Grid. Depending on your requirements, you can choose the layout. I recommend going with the table layout if you plan to add lots of PDF files to your library.
- Folders - This option enables the folders structure to make navigation and sorting more organized.
- Columns - Select the columns you want to have on your PDF table. There are multiple columns to select from, and you can even rename the columns if required.
- Link style and destination - The link style defines how the clickable link column is displayed on the website, and the destination tells what happens when someone clicks on a link to a PDF or a document.
- Sorting and Search box- For improved navigation, you can use the sort and search box feature to help users find documents quickly.
Now you're all set! Next, we can start adding WordPress PDFs.
Structuring your WordPress PDFs library
Before you can start uploading PDFs, I recommend that you use categories and tags to build a scalable structure for your WordPress PDFs.
Document categories work just like WordPress post categories. You can create a hierarchical structure for categories and subcategories depending on their nature.
To create a new category, follow these steps:
- Go to Documents → Categories. You can add a new category on the left, and all the existing categories are listed on the right.
- To add a new category, type in your category name and slug. If you want this to be a subcategory, select the parent category from the dropdown list.
- Give your category a short description and set the visibility.
- Finally, hit the Add New Category button.
- Repeat the steps to add more WordPress PDF categories.
Restricting access: If you wish to restrict the category from certain users, you can use the Protected or Private visibility option. All subcategories and PDF files within the category will inherit the same protection. This option is powered by the Password Protected Categories plugin is designed to work alongside Document Library Pro. If you wish to use this feature, you can get the two plugin bundle for a discounted price.
Just like adding tags to blog posts, you can add tags to PDF uploads. You can then fetch the PDF or document files with the same tag or label. For example, you can add tags such as publisher, publish month, niche, interests, or anything else and display or embed PDF files with the same tags using the shortcode.
To add new tags for PDF files and other documents, follow these steps:
- Go to Documents → Tags. You can find all the existing tags on the right.
- To add a new tag, type in your tag name, slug, and tag description.
- Click on the Add New Tag button. Your newly added tag will start showing up in the table on the right.
- Repeat the above steps to add more tags.
Additionally, if you want more control over your PDF library structure, you can create custom taxonomies to further group your PDFs. For example, you can use the built-in Author taxonomy to group the files with the name of document authors. You can also add a search function to make navigation easier.
Now once you have your categories and tags structure in place, you can start uploading WordPress PDFs to Document Library Pro.
How to upload PDF files to the WordPress PDF library
There are five different ways you can upload PDFs to WordPress. All of them are pretty easy, and you can go with the method that works best for you:
- Create documents individually and either upload the PDF directly or link to a PDF hosted elsewhere
- Select PDF files from the Media Library
- Drag and drop PDF files
- Bulk PDF files CSV upload
- Front end PDF upload form
Let’s check each method in more detail.
Method 1: Create PDF documents individually
This method lets you upload a single PDF to your website at a time. Here’s how you can do it.
- Go to Documents → Add New.
- Fill in all the relevant details. Enter the document name, description, slug, and featured image, and select from the list of categories and tags.
- To upload a PDF to the WordPress Media Library, select the Document Link at the top right corner as File Upload. Now click on the Add File button and go to Upload Files → Select Files. Choose the PDF file you wish to upload and click on Add File button.
- Alternatively, select the Document Link at the top right corner as File URL. Then paste the URL of wherever the PDF file is hosted.
Method 2: Link to PDF hosted externally
If you do not wish to upload PDFs to WordPress site, you can host it externally, such as Google Drive or Dropbox, and add a link to your document library. Here’s how you can do this:
- First, go to Documents → Add New.
- Just like the previous method, add all the relevant details such as tags, categories, name, slug, etc.
- Select the Document Link at the top right corner and select a custom URL from the dropdown.
- Paste the live link to the PDF and publish the document.
Do keep in mind that if the file isn’t hosted on the website, your users won’t be able to preview it before downloading.
Method 3: Select PDF files from the media library
If you already have PDF files hosted on your website in the media library, you can follow this method to add them to the Document Library. Here’s how you can do this:
- Go to your WordPress Media Library.
- Switch to List view and select the PDFs you wish to add to your WordPress PDF library.
- From the Bulk Actions dropdown, select Add to document library and click Apply. All the selected PDFs will be imported successfully.
- Since you might need to add tags, categories, and other details for the newly imported PDFs, click on the link at the top to review and update recently imported WordPress PDFs.
Method 4: Drag and drop PDF files
If you wish to upload multiple PDF files simultaneously, you can use the drag and drop method. Here’s how you can do this:
- Go to Documents → Import.
- Select the PDF files you wish to import from your PC or desktop.
- Drag and drop the PDFs on the Import page → Drop files to upload area.
- Go to the All Documents section to make changes to the PDFs that you uploaded to WordPress individually.
Method 5: Upload PDFs to WordPress in bulk via CSV import
This is a slightly more advanced way of uploading PDFs to WordPress, but it's also the best for adding in bulk. It involves creating a CSV file containing all the details for multiple PDF files.
Here’s how you can use this approach:
- First, make sure you have already added all the PDFs to the WordPress Media Library or wherever else you plan to host them. Copy the URL for each PDF for step 2.
- Create a new CSV file with a list of all the details of the PDFs, such as PDF URL, category, tags, document authors, etc. If you’ve added custom taxonomies, you can add new columns with the same taxonomies and map them later.
- Once you have your CSV ready, go to Documents → Import.
- Follow the on-screen steps to map the columns to your document library fields.
You can use this sample CSV file to upload PDFs to WordPress easily. This is what the CSV file should look like:
How to display WordPress PDFs on the frontend
Once you have your PDFs in your library, you can finally check them on the front end. This section will talk about how you can add a downloadable PDF to WordPress.
Document Library Pro creates a main document library page that lists all the documents in the library. To access this web page, go to Pages → Document Library page → View.
Alternatively, the plugin has a shortcode with various options for listing specific WordPress PDFs only. For example, if you want to display PDFs from the category ‘Fiction’ from the year 2023, you need to use this shortcode:
[doc_library doc_category="fiction" year="2023"]
Learn more about Document Library Pro shortcodes.
Case studies - See WordPress PDFs in action
International Arctic Research Center (IARC)
International Arctic Research Center has multiple lists of PDFs on their website. To make this more organized and structured, IARC uses the shortcode feature to list different categories of WordPress PDFs on multiple pages.
They use it to list reports, academic publications, previous research activities, and case studies on different pages.
Each PDF table is accompanied by a quick search box and filter dropdowns to help the viewers find their desired documents.
Just like IARC, you too can take control over displaying PDFs on your website with the Document Library Pro plugin.
NER Model Railroad Association
The Northeastern Region Model Railroad Association uses Document Library Pro to list multiple PDF files such as meeting minutes, monthly publications, and handbooks.
While they upload all PDFs to the WordPress Media Library, they are segmented with the help of PDF categories.
On the Documents page, NER has divided the WordPress PDFs into multiple categories. Users can sort the tables in ascending or descending order by clicking on the column headers. If they want to download multiple files, they can simply select the checkboxes and click the Download Selected Documents button.
Here's what NER had to say:
Like NER Model Railroad Association, you can also set up Document Library Pro and upload PDFs to WordPress in no time. I'll tell you how to do that next.
Further reading: A guide to uploading files to WordPress.
How do I upload PDF files in WordPress without a plugin?
So far, you've learned how to upload a PDF to WordPress using the Document Library Pro plugin. This is the best option if you want to list multiple PDF's on your WP site.
If you're wondering how to upload a PDF to WordPress without a plugin, then I'll tell you how to do that next. You don't need any WordPress PDF plugins for this.
How to embed a PDF in a WordPress page or post
- Go to edit any page or post on your WordPress site which uses the Gutenberg block editor (this is the standard page builder that comes with WordPress itself).
- Click the + icon and find the 'File' block.
- Click 'Upload' and add the PDF to WordPress.
Tip: If you're not using the Gutenberg block editor, then your chosen page builder plugin (e.g. Elementor or Divi Builder) will have a similar option. For example, when you're creating an Elementor PDF viewer then you need to use an Elementor shortcode block. It might have a different name in other page builders.
How to add a PDF to WordPress as a text link
If you don't want to fully embed the PDF, then you can add it as a basic text link instead:
- First, go to Media → Add New in the WordPress Dashboard and upload the PDF to WordPress.
- Copy the PDF's 'File URL' to your clipboard.
- Now edit the page or post that you want to link to the PDF from.
- In the body of the page or post, type the text that you want to turn into a link, highlight it, and use the 'Insert/edit link' icon to add the link. For the link URL, paste the URL of the PDF file that you copied in step 2.
This will add the PDF as a normal text link in your WordPress page or post.
The best WordPress PDF plugin
With the Document Library Pro plugin, you can easily upload, set up, and manage your PDF library in no time. Not just PDFs, you can host and manage other files such as images, videos, and audio files.
- Easy setup process
- Seamlessly upload PDFs to WordPress
- Advanced shortcode functionality
- Perfect for non-developers and novice WordPress users
- Advanced control over WordPress PDFs behavior and functions
- Access to future updates and new features
- 30-day money back guarantee - try it risk-free!
I hope you found this tutorial useful. If you have any questions regarding this guide, please let me know in the comments section below!