How to create a powerful WordPress document library

WordPress document library plugin

Discover the easy way to build a searchable WordPress document library with easy document management, support for any file type, and more.

A WordPress document library plugin presents your documents and other resources in an easy-to-find format. It allows you to keep things organized, share files publicly or with colleagues, and create a resource hub or a publications database.

It's surprisingly hard to find a good document library plugin. There are lots of file management and media library plugins available, but very few to create a searchable front-end WordPress document library. The ones that do exist have poor ratings, missing features, and a lot of negative feedback.

That's why we built Document Library Pro. We consulted thousands of WordPress users to find out exactly what they want. We used the results to design the best document management platform on the market.

In this tutorial, I'll explain how to create a document library in WordPress from start to finish. It's really easy and you don't need any technical knowledge.

What you'll need to create your WordPress document library

You need 3 things to build a document library in WordPress:

  • A WordPress website.
  • The Document Library Pro WordPress plugin.
  • The files that you want to list in the document library. You can host these in the WordPress Media Library, or literally anywhere else on the web (Google Drive, YouTube, SoundCloud, Dropbox, etc.).

The complete document library solution

Document Library Pro has everything you need to add and display documents:

  • Quickly add documents to WordPress - Either manually, using drag and drop, as a bulk CSV upload, or via a front end upload form for your users.
  • Store extra data about each document - Make the WordPress document library more accessible by adding extra information such as a title, excerpt and description. Other data is calculated automatically, such as file size, file type, date, and last modified date.
  • Instantly list documents in a searchable, sortable table with filters - or alternatively in a tiled grid layout.
  • Supports any file type - The WordPress document library plugin supports literally any file type that can be stored in the Media Library. If the documents are hosted externally then you can link them to any third-party website like Dropbox, Office 365, or YouTube.
  • Embed documents, audio, and video - Instead of (or as well as) download links, you can display documents directly on your website. You can even add embedded music and video players which people can play on the main document library page.
  • Flexible download links - Choose whether to show download buttons, text links, or file type icons on your main document library page. Also, choose whether to provide instant downloads or a separate page for each document.
WordPress document library plugin

How it works

To use the WordPress document library plugin, you simply add your documents to the WP admin. The plugin takes care of the rest and automatically displays them in a searchable document library in the front end. You can choose which columns of information to include, whether to structure the documents into folders based on their category and much more.

People can easily find the documents they're looking for and either read them online or download a file.

WordPress document library grid

What sort of documents can I display?

The document library plugin can list any type of document on a WordPress website. This includes:

  • Any document file typePDF, DOC, XLS, PPT, EPUB, Google Docs & Sheets, video, etc. This WordPress file manager plugin supports literally any file type.
  • Corporate documentsContact lists, data sets, documentation, financial spreadsheets, forms, how-to guides, handbooks, instructions, legal documents, license agreements, lists, manuals, policies and procedures, reports, stationery, templates, terms and conditions, white papers, worksheets.
  • Promotional documentsCase studies, flyers, leaflets, marketing materials, Keynote or PowerPoint presentations.
  • Industry-specific documentsBlueprints, manuscripts and sheet music, maps, signage.
  • Personal documentsDownloadable kids activities, leisure guides, nutrition guides, recipes, treasure hunts.
  • WordPress audio or video galleryYou can display photos, music, and videos in a WordPress audio library or video gallery, creating any type of resource or document gallery!

Step-by-step guide to building a WordPress document library

Document Library Pro circle cropped

Like what you see? Great! Next, I'll show you how to create a WordPress document library for your documents, publications, or any other type of resource.

I'll also share some bonus tips on how to add extra features to your WordPress document library. This includes how to make parts or all of the document library private, document management advice, and embedding multimedia content such as flip books, audio, and video. You'll be amazed at everything you can do with your document libraries 💪

First, watch Sam explain how to create a document library with WordPress and build your own along with him. Alternatively, keep reading for full written instructions:

1. Install Document Library Pro

Installing the WordPress document library plugin only takes a minute:

  1. Get Document Library Pro and download the plugin files from the order confirmation page or email.
  2. In the WordPress admin, go to Plugins → Add New and upload the plugin zip file that you just downloaded. Click 'Install' and then 'Activate'.
  3. Activate your license key in the plugin setup wizard.

2. Set up your document library

The Document Library Pro setup wizard will guide you through the main settings. You can then access more advanced settings at Documents → Settings.

First, use these options to set up your document libraries globally. Later, you can override these options for each individual list of documents as needed.

Recommended settings

  • Layout - Choose between a table or grid view. I recommend the table view if you have lots of documents, as it displays more per page. Use the grid view for smaller document libraries where you want to make each document more prominent.
    setup wizard document library pro
  • Folders - Tick this to automatically structure the document library into folders, instead of as a single list. There will be one folder for each document library category.
  • Content - Choose what data to display in your document library. There's a huge range of possible columns to choose from, including the document name, description, file size, file type, published date, modified date, and download link. You can rename the columns as needed.
  • Link style - Decide whether the document link field will display a download button, text link, or file type icon.
  • Link text - Change the word 'Download' to anything you like, such as 'View' or 'Read Online'.
  • Clickable columns - These link to an individual page for each document. If you don't want a page for each document, then set this option to 'none'.
  • Search filters - If you will have lots of documents in each table, then add filter dropdowns to help people find them more easily. You can have filters for your document categories, tags, or any custom taxonomy (see bonus tips).
    Filter document library

There are also lots of other settings to choose from. For example, you can optionally customize the document library's design:

Customizable document library plugin

3. Structure the document library

Document library categories

Before you start adding documents, it's important to plan the structure of the document library. This is an important part of organizing your document library.

The WordPress document library plugin provides 2 ways to organize documents:

  • Document categories - Create hierarchical categories and sub-categories, structured into unlimited levels.
  • Document tags - Add tags or labels to each document. For example, you could use tags for the document year, publisher, topic, type, or something else. (If you want multiple types of labels, then you can do this by creating custom taxonomies to use as well as tags.)

Your document library can display each file's category and tag. It can also include category and tag filters to help people to find documents more easily. You can even create multiple document libraries, each containing files with a specific category or tag.

4. Add documents to the library

Now it's time to start adding documents!

The Document Library Pro plugin is ultra-flexible and supports any type of 'document'. A document could be:

  • A downloadable file that is stored in the WordPress Media Library - e.g. a PDF, image, or PowerPoint presentation.
  • Any downloadable file that is stored on a third-party platform like Dropbox, Google Drive, Microsoft SharePoint, or Box.
  • A resource that is available for people to read directly on your website, without having to download anything.
  • Any resource that you embed directly into your website - e.g. a page-turning flip book or an embedded Google Drive document.
  • A link to a web page, either on your own website or on a different website.

As you can see, that's a pretty wide definition of a 'document'! Whatever type of document or resource you want to display, you can do it with Document Library Pro. Simply add or upload the document along with any extra data that you want to display about it. It will then be stored in a dedicated 'Documents' section of the WordPress admin.

This makes document organization really straightforward while keeping your documents separate from other website content and Media Library files.

5 quick ways to add documents

Now we know what the WordPress document library plugin can display, you can choose the best way to add your documents:

  1. Add documents manually - It's just like adding a page or post in WordPress!
  2. Select files already in the WP Media Library - Are your documents already in WordPress? Add them to Document Library Pro in seconds.
  3. Drag and drop file upload - Drag files straight into the document library.
  4. Bulk import documents from CSV - To import large numbers of documents to the library, add all the data to a CSV file, and upload it to WordPress.
  5. Front-end document submission - Allow users or team members to add documents without having to log into the WordPress admin.

All these methods let you choose what information to display in the document library (summaries, file type, file size, category, etc.), and add links to access or download the document. They all support every file type, including uploaded PDFs, JPG, DOCx, etc.

How to add documents manually
Add document to library

You can add documents one by one, in exactly the same way as you add pages and posts in WordPress:

  1. Go to Documents → Add New.
  2. Add all the information that you want to display about the document, such as the name and description. Ignore the file size option if it's a downloadable document because this will be calculated automatically.
  3. For the main content, either add a description, leave this blank, or add the full document. This might be the full text of the document (you can add thumbnail images etc. as required), an audio or video player, a Google Drive document embedded onto the page, or even a flip book plugin.
  4. Choose an option in the 'Document Link' section:
    1. File Upload - Upload any file type which users can download.
    2. Custom URL - Add the URL of where the document is located, e.g. a Dropbox or Office 365 link, or a third-party website.
    3. None - Choose this if you are embedding the document into the main content instead of as a clickable link.
  5. Click 'Publish' to instantly add the document to the library. You can optionally set a date when the document will expire and be removed from the library.
How to add Media Library files to the document library

Lots of people install Document Library Pro after using a different plugin. If your document library files are already in the WordPress Media Library then you can easily convert them into documents:

  1. Go to the 'Media' section in the WP admin.
  2. Make sure you're on list view rather than grid view (click the icons in the top left to switch).
  3. Tick the files that you're adding to the document library plugin.
  4. Use the bulk actions dropdown to select 'Add to document library'.
  5. Click the link that appears to view your documents. You might want to tweak some details like the name or add extra information about each document.
Add Media Library files to document library
How to add documents using drag and drop

If you want to add lots of downloadable files to the document library, then the draft and drop uploader provides a useful shortcut:

  1. Go to Documents → Import.
  2. Drag and drop the files onto the page.
  3. Go to the 'Documents' section of the WordPress admin to view them and make any changes.
drag and drop multiple PDF into Document Library
How to import documents from CSV

The WordPress document library plugin provides a fully automated way of importing documents in bulk:

  1. Use any spreadsheet program (e.g. Excel) to add all the information about your documents to a CSV file, including the URL of where it is currently located. For a useful starting point, download the sample CSV file from the document library plugin knowledge base.
  2. Go to Documents → Import.
  3. Follow the on-screen instructions to upload your CSV file. This includes a page where you choose which column from the CSV to map to each field in the document library.
csv import documents wordpress
Set up front-end document submission

A lot of websites list documents that users have submitted themselves. For example, you might allow people to submit resources which are then shared with the entire community. Or perhaps you want an easier way for employees to add documents to the library without accessing the WordPress admin.

The WordPress document library plugin comes with a front end document upload form. To use this, simply add [dlp_submission_form] anywhere on your site.

You can put the document upload form on a public or private page on your website. When new documents are submitted, you can either publish them immediately or hold them for moderation first.

Submit document to library WordPress plugin

5. Make the document library searchable and filterable

Above, I showed you how to add filter dropdowns above the library so that users can filter documents by category, tag, and so on.

For even more advanced filters, you can use Document Library Pro with the FacetWP plugin. This lets you add filter widgets like this:

Document grid with FacetWP filters

6. Creating custom download buttons/links

Document Library Pro lets you choose between 6 styles of button to link to your documents:

Think carefully about which button style will work best for your document library. For example:

  • If you're listing different file types in the same library, then the file type icon makes it clear which is which.
  • Where it's obvious what the button will do, a simple download icon is enough.
  • If the action isn't clear, then add button text to clarify what the button does. For example, if you're creating a WordPress audio library with files hosted on SoundCloud then you could change the button text to "Listen Now".

As well as (or instead of) the download buttons, Document Library Pro also provides preview buttons. These come with a similar choice of styles.

You can control all the the button styles on the settings page at Documents → Settings.

7. View the document library

Now it's time for the fun bit: seeing your WordPress document library for the first time.

When you installed the Document Library Pro plugin, it created a main document library page for you. This page lists all your documents in a beautiful document directory on the front end of your website. You can find this in the main list of 'Pages' in the WordPress admin.

Depending on your settings, the document library page may look something like this:

WordPress document library plugin folders
A document library with folders

Or this:

WordPress document library plugin with links
Document library without folders

Or even this:

Grid layout document library tiles
A document grid

8. Create additional document libraries (optional)

So far, you've learned how to display all your documents on the main document library page. If you prefer, then you can use a shortcode to add multiple document libraries.

Use the shortcode options to list different documents on different parts of your WordPress site. You can also change other details such as the table columns and whether to display download buttons or file type icons. This is a great way to make your document library more varied, tailoring each table to the type of documents you're listing.

Customizing access to the document library

Now, I'll tell you how to hide your entire document library or specific parts of it. We'll do this with the Password Protected Categories WordPress plugin. This easy-to-use plugin lets you customize access to each category of your document library. You can either password protect categories (no user login required), or restrict them to specific users or roles.

You can either:

  • Create a 100% private document library by restricting access to the top level document category. This will automatically protect all the documents and sub-categories, or;
  • Set different passwords to different document categories, while leaving other categories public if required.

The most cost-effective way to get Password Protected Categories is as a 2-plugin bundle when you buy Document Library Pro.

Password protecting certain documents or categories

The first way to customize access to your WordPress document libraries is to use simple password protection.

With this method, people must enter a correct password to unlock the category and view the private documents. Once they've unlocked a category, they can navigate within it and its sub-categories. They won't need to re-enter the password until it expires. (You can set the expiry time in the plugin settings.)

The benefit of this method is that you don't have to create a separate user account for everyone who accesses your document library. For example, let's say you're creating a private intranet for employees. There's no need for each person to have their own user account on your WordPress site. Instead, just give them a password. This unlocks the protected library without needing an individual login.

How to password protect the document library

  1. Purchase and install the Password Protected Categories plugin.
  2. Go to Documents  Categories.
  3. Find the 'Visibility' settings for the main category you want to protect. Select 'Protected' and enter 1 or more passwords in the 'Password protected' section.
    add password to woocommerce protected categories
  4. Now go to the main Documents list in the WordPress admin and categorize your documents as needed.
  5. Finally, create a login page for your users by adding the shortcode [category_login] to any page on your site. Or even better, add the shortcode to the top of your document library page. As soon as someone enters a correct password, the hidden documents will appear in the library!

Restricting access to specific user roles

If you'd rather create a separate user account for each person who accesses your document library, then that's fine too. The Password Protected Categories plugin also lets you restrict document categories to specific user roles - or even individual logged in users.

Use this method if you:

  • Want the most secure option.
  • Are prepared to create a separate user account for each person who accesses the document library.
  • Want to hide all your documents, just some of them, or show different documents to each user.

The instructions for this are similar to the instructions for creating password protected categories. But this time, use the 'User roles' or 'Users' options instead of 'Password protected':

password protected categories - user roles & users option

Tips

  • For more granular control, create multiple user roles and show different documents to different users. Your main document library page will automatically show the correct documents for each logged in user.
  • If you don't already have a user-friendly login page, use a free front end login plugin such as Theme My Login or Profile Builder.
  • Are you showing different documents to different people? If so, DO NOT tick the 'Caching' option on the document library plugin settings page. This will ensure that each user sees the correct documents rather than a cached version of the library.

Enhancing your WordPress document library

Next, I will share some tips on how to add even more features to your document libraries.

Add extra fields to the library

The document library plugin for WordPress comes with all the standard fields you're likely to need. It even automatically generates extra fields such as the file size and file type.

If you want to display additional information about your documents then you can add extra fields to the document library. For example, you might want to show the publication date or publisher. Maybe you want to display a unique document reference code or version number. You can store all this extra information in custom fields and taxonomies.

First, decide whether to store the extra data as a custom field or taxonomy:

  • Custom fieldsUse these to store unique data about each item in your WordPress document library. For example, if you're using your document library to store internal publications, each one might have a unique document number. You would store the document numbers as a custom field.
  • Custom taxonomiesTaxonomies are an opportunity to sort and organize data. Use these to store information that will apply to multiple documents in your library. For example, you might want people to be able to filter the document library to view documents from a particular year. To do this, you would create a taxonomy called 'Year' and assign each document to the appropriate year.

Our free Easy Post Types and Fields plugins let you add custom fields and taxonomies to the 'Documents' post type. These will appear on the 'Add/Edit Document' screen in WordPress, where you can add all the extra data for each document.

Display your extra document fields

Front end WordPress media library filters
A document library with custom taxonomies for Media Categories and Document Years

Once you've added your custom fields and taxonomies, you can start displaying them in your document library:

  1. Go to the WordPress document library plugin settings page (Document Library Pro Settings).
  2. Extend the content field to include your custom fields and taxonomies:
    • Custom field column - add cf: followed by the custom field name (e.g. cf:size)
    • Custom taxonomy column - add tax: followed by the custom taxonomy slug (e.g. tax:year)

For example, your list of columns might be: title,excerpt,cf:size,tax:document_year

This will create a WP document library like the screenshot above.

How to sell documents

So far, I've assumed that you want to provide free access to your WordPress document library. But what if you want to sell printed or digital documents online? Fortunately, you can do that too.

The easiest way to create an e-commerce document library is to use our other plugin WooCommerce Product Table, instead of Document Library Pro. The instructions for selling documents in this way are similar to the document library tutorial in the previous sections. The main differences are:

  1. Add each document as a WooCommerce product. This is instead of having a 'Documents' post type for storing documents or displaying files from the media library. In WooCommerce, choose the 'Downloadable' product type and upload the file that people will receive after purchasing the document. You can also add other information such as the price.
  2. WooCommerce Product Table has a different shortcode for listing your document products. You can read about all the options in this article.

Your WordPress document library will look similar to the other screenshots in this article. The difference is that they will actually be e-commerce products available for sale, with add-to-cart instead of download buttons.

Tips for managing your WordPress document library

After your document library goes live, you can sit back and relax knowing that people can easily access your documents. However, at some point, you'll need to add more documents or edit existing ones. Luckily, the Document Library Pro plugin makes ongoing document management easy for you.

You can easily view all documents in the 'Documents' section of the WordPress admin. Use this to find and filter documents before making changes.

Manage document library

You can also view the files which are attached to your documents. Just go to the 'Media' section of the WP admin and select 'Documents' from the 'All types' dropdown list.

Updating document files

Many document files need to be updated at some point. For example, you may need to replace a link to an old PDF with an updated one. There are several ways to do this:

  • Simply replace the file - You can delete an existing file and upload a new one on the 'Edit' screen for each document. To avoid duplication, install the free Enable Media Replace WordPress plugin. You can then overwrite old versions when you upload a new file, without changing the URL.
  • Enable version control - There's an option to enable version control on the Document Library Pro settings page. This lets you choose what happens to the old file when you upload a new one.

Making documents editable from the front-end

If you want colleagues to be able to edit documents from the front end, then we recommend a choice of 2 excellent plugins for this.

WP Sheet Editor adds 'Edit' buttons above or below your document library, which only appear for certain user roles. Users can click these to open an editable spreadsheet-style table with all the document data. We have a separate tutorial on how to set this up.

Edit spreadsheet with WP frontend editor

Alternatively, WPSyncSheets has an add-on for Document Library Pro which lets you edit documents via a Google Sheet:

WPSyncSheets edit documents front end spreadsheet

How to track document downloads

The Document Library Pro plugin has a Download Count column which you can include in the document library. This displays the number of times the document has been downloaded. You can either view the count in the WordPress admin, or display it on the front end like this:

Document library author and download count column

For more advanced tracking, you can also use Google Analytics to collect more advanced data about how people are using the WordPress document library. Moz have published an excellent tutorial on How to Track PDF Traffic and Links in Google Analytics. Use this as a starting point to track whichever types of links you're adding to your document library.

Alternatively, you can use Document Library Pro with the Download Monitor plugin. This lets you track and report on the number of people who download your documents, plus exactly which users downloaded which document:

Download Monitor see who downloaded document

Get started: Build a WordPress document library in minutes

Now you know how to create a fully functional document library for your WordPress site.

Document Library Pro is the ultimate solution for adding a searchable library of any type of file or resource to WordPress. It comes with everything to streamline your document-handling process:

  • 100% flexible.
  • Quick 5-minute setup.
  • Create unlimited document libraries.
  • Ideal for non-technical website owners and developers.
  • 30-day money-back guarantee - try it risk-free!

I hope you enjoy creating your document directory with the best WordPress document library plugin! Let me know how you get on in the comments below.

50 Comments

  1. Hello, I am looking for a WordPress plugin that creates a viewing-only library (no downloading, no printing) of documents. Does your plugin provide a way of allowing users to view the full document only, and not be able to download or print? For instance to read a pdf or watch a video, but not be able to download it.
    Thanks for your answer
    Robin

    • Hi Robin, Thank you for your interest our plugin. The Document Library Pro doesn't have the option to make documents view-only but I'm glad that you mentioned it. While we don’t have any immediate plans to implement this, a few other people have previously requested this feature and we’re tracking the amount of demand to help us decide whether to prioritize it in the future. I have added your ‘vote’ to our feature request list, and we will let you know if we add this to a future version of the plugin.

      In the meantime, you can host your documents externally in file sharing apps like Google Drive or Dropbox where you can prevent downloads/printing through the settings page and use the Document Library Pro to display them on your website. I hope this helps. We can talk more about it via our dedicated Support Center

  2. I am trying to find a plugin that will allow registered users the ability to upload files (videos, documents, recipes, family trees, etc) to a third-party cloud service (OneDrive, Google cloud, dropbox, etc.) Will this plugin provide that ability?

    • Hi, Bradley! Thanks for your interest in our plugins. You can add a gravity form on your site where users can submit documents that they have already uploaded to a third-party cloud service. You can add an address/URL field in the form that is mapped to the Document Link - Custom URL field in our Document Library Plugin as described in our knowledgebase article: Add documents manually . You can also enable moderation for all submissions for review and approval of an admin. Lastly, if you'd like to control the visibility of the front-end Gravity Form to only registered users, you can use a plugin called Advanced Access Manager . Please let me know if you have any more questions. You can also enquire in more detail via our dedicated Support Cente

Please share your thoughts...

Your email address will not be published. Required fields are marked *