How To Create A Custom WordPress Document Library

If you purchase through a link on our site, we may earn a commission. Learn more.

In this post, I'm going to show you step-by-step how you can create your own flexible WordPress document library. Unfortunately, WordPress doesn't really have any core functionality to create a scenario where visitors are able to browse, filter, and/or download documents like PDFs, images, etc. But - as is often the case with WordPress - a WordPress document library plugin can step in to save the day.
Table of Contents
WP Engine High Performance Hosting
BionicWP Hosting

Searching for a solution to create a WordPress document library?

Unfortunately, WordPress doesn’t really have any core functionality to create a scenario where visitors are able to browse, filter, and/or download documents like PDFs, images, etc. It also only lets you add documents directly to the WordPress Media Library, which is difficult to manage because they’re mixed up with other files such as images.

But – as is often the case with WordPress – a WordPress document library plugin can step in to save the day.

In this post, I’m going to show you step-by-step how you can create your own flexible WordPress document library.

Because this method is so flexible, you’ll also be able to tweak your document library as needed to include more information or make things even more stripped down. You can even add filter dropdowns, file type icons, embedded audio, and video players.

To build your WordPress document library, all you’ll need is a little bit of your time and $79 from your wallet. I’ll show you how to do everything else!

Create a WordPress document library for your WordPress site with Document Library Pro.

Why Document Library Pro Is The Best WordPress Document Library Plugin

Document Library Pro is the premium plugin that’s going to take that $79 from your wallet.

It lets you add documents and display them on your WordPress site in searchable, sortable tables with filters. That’s all you need to create a WordPress document library – even if you have thousands of documents!

Advanced Document Management

This WordPress document library plugin lets you:

  • Add and import documents. You can add them one at a time (just like adding a blog post in WordPress) or import them in bulk.
  • Manage documents. They appear in a special ‘Documents’ area in the WordPress Dashboard, so you can easily manage them away from your other Media Library files.
  • Supports all file types and 3rd party platforms. The document library plugin supports literally every file type. You can either store documents in the WordPress database, or link to documents that are stored externally – for example, on Dropbox, Microsoft SharePoint, or even YouTube videos.
Final Result of a document library

Interactive Front End Document Libraries

Once you’ve added your documents, it’s easy to list them on your WordPress site:

  • Control exactly what information is displayed in your library. For example, you can add a document reference number, publication year, file size, file type, or anything else.
  • Include sort and filtering options. For example, you can let users filter by document tags or categories.
  • Add an AJAX search form. Let visitors search your document library without even having to reload the page.
  • Quick download links. Users can click a download button, text link, or file type icon to download the document – or access documents stored on a third-party URL.
  • Flexible document library layouts. You can list documents in a single table, or as a series of clickable folders that match your category and sub-category structure.
  • Create separate document libraries for different categories. You can create multiple document libraries and control exactly which files show up in each library for easy WordPress document management. This is useful if you want a separate page for Documents, Resources, Case Studies, Publications, and so on.
  • Individual document pages. The document library plugin automatically creates an individual page for each document. This displays extra information about the document, or you can disable it if it’s not required.
  • Supports audio, video, and other embedded content. Document Library Pro is about more than just displaying downloadable documents. You can also display other types of resources including WordPress audio libraries with embedded music players, or video galleries with embedded videos. It even works with other third-party embedding plugins, such as Google Drive embeds, PDF embeds, or flipbook plugins.

Basically, the plugin to lets you create a document library that’s unique to your needs. This is better than forcing you into a pre-configured setup like some WordPress document management solutions.

Video Tutorial (Sneak Peek)

Ok, hopefully, I’ve convinced you that it’s at least worth checking out the rest of this tutorial. Now, let’s get into the hands-on part and I’ll actually show you step-by-step how to go about setting up your own WordPress document library. If you prefer a video tutorial, here’s an in-depth one from Barn2.

Step-By-Step: How To Create A WordPress Document Library

There are three core parts to creating your document library:

  1. Get all the tools you need
  2. Prepare the custom fields you’ll need for your documents
  3. Add or import your documents and other resources
  4. Create your document library
  5. Display your document library on your website

Here’s how to perform each part in detail…

Part 1: Install The Document Library Pro WordPress Plugin

To get started, install and activate the Document Library Pro plugin from Barn2.

Once installed, go to the settings page at Documents → Settings and activate your license key. You can get this from the order confirmation page or email.

In the ‘Document Fields’ section of the page, enable whichever fields of information you plan to store about your documents. If you want any additional fields – such as ‘Publisher’ if you’re listing books – then you can install a free plugin such as Custom Post Type UI. Use it to add extra fields to the ‘Document’ post type:

  • Custom fields. Use these for storing unique data about each document, such as a reference number or ID.
  • Custom taxonomies. Use these for storing information that you will use to group documents, such as ‘Publisher’ or ‘Year’. If you add these as taxonomies then you can display them as filter dropdowns above the document library so that users can filter by them.

Tip: You don’t need to create custom fields for file type, file size, date, or modified date. The document library plugin can calculate and display these for you automatically!

Don’t worry about the ‘Document Libraries’ tab of the plugin settings page for now. We’ll look at that page in more detail in Part 3 after you have added some documents.

Document Library Pro

Use Document Library Pro to create a searchable, sortable document library for your WordPress site. Get started in less than 5 minutes.

Buy Plugin

Part 2: Add Your Documents And Other Resources

Now, it’s time to add your documents to the library. This is pretty simple – it’s just like writing a regular WordPress blog post! There are also several ways to import documents in bulk, and I’ll tell you about these too.

Adding Documents Individually

Go to Documents → Add New in your WordPress dashboard. You should see what looks like the regular WordPress Editor.

Here’s how to properly upload a document:

  1. Put the document’s title in the regular Title Area.
  2. Add a short description for the document in the regular post editor area. You can also use this space to embed resources, such as audio or video players. This will appear as the ‘content’ column in the document library (if you include this in the library), and also on the single document page.
  3. Add a brief excerpt, if required.
  4. Add a Document Link – either by uploading a file directly to WordPress or by linking to a third-party URL such as Google Drive. If you’re just embedding the document onto the page and don’t need a download link, then select ‘None’.
  5. Select categories and tags. These help to structure the document library and make the documents easier for people to find.
  6. Enter any custom fields or taxonomies (if you’re using any).
Adding a new document in the Document Library Pro plugin.

Now, you just need to repeat the process to add all the documents you want to include in your document library.

Importing Documents

The Document Library Pro plugin provides 3 ways to import multiple documents at once:

  • Convert Media Library files to documents. This is useful if your documents are already saved in the WordPress Media Library. Go to the Media section of the WordPress Dashboard, tick all the documents (ignoring other files such as images), and open the Bulk Actions dropdown list. Choose the ‘Add to Document Library’ option. This will add all of the selected files to the ‘Documents’ section of the WordPress Dashboard, where you can edit and add the information about each one.
  • Drag and drop file upload. Go to Documents → Import and use the drag and drop file uploader. This adds each file to the ‘Documents’ section, using the filename as the document title. You can then edit this and add extra information about each document.
  • CSV upload. This is the most comprehensive way to upload documents in bulk. You’ll definitely want to use this method if you have hundreds or thousands of documents. Prepare a CSV file with a column for each piece of information that you want to display in the document library. Include the URL of wherever the file is stored.

Once you’ve added items to the document library, you can start displaying them on the front end of your WordPress site.

Part 3: Create Your Front End Document Library

You’re almost at the finish line! Now, you just need to use Document Library Pro to create your front-end WordPress document library.

To configure the display of your document libraries, go to Documents → Settings. In this interface, you can configure the default settings for each document library on your site (you can always override these settings manually using shortcode parameters):

The Document Library Pro settings.

You can also read this Document Library plugin help article for a full list of all the options.

Pay particular attention to these document library options:

  • Columns. This option controls which information appears in the document libraries.
  • Document links. These options control the download buttons which appear in the ‘links’ column. You can display these as text links, buttons, or file type icons. There are also options to control the link behavior, and whether to let people access the single document page.
  • Filters. Choose the Custom filters option and add doc_categories, doc_tags. This will display filter dropdowns above the document library so that users can filter by category or tax. If you’ve added any custom taxonomies then you can add filters for these too – just add tax: before the taxonomy name.

If you want to go even further with your WordPress document library, the Document Library plugin documentation explains how to control things like:

Adding Extra Features To The Document Library

The Document Library Pro plugin has everything you need to list documents or any other type of resource in WordPress. This is perfect for nearly all types of document libraries.

Barn2, the company behind the plugin, has extensively tested Document Library Pro with many other plugins. You can use it with other plugins to add even more features to your document libraries. The possibilities are endless, and here are some examples.

Private Document Libraries

You can use Document Library Pro on a private staff intranet that only your organization can access.

If your intranet is already private, then simply install Document Library Pro as it comes. It will be protected under the structure of the rest of your intranet.

Alternatively, you can use Document Library Pro with membership or password protection plugins to restrict the document library part of your site. For example, you can do this with Barn2’s Password Protected Categories plugin. Document Library Pro also works with most WordPress membership plugins.

How to Track Document Downloads

I expect that like most WordPress users, you already have Google Analytics installed on your website. You can easily extend this to track the number of people who download each document from the library.

To set it up, check out this tutorial from MonsterInsights. This works nicely alongside the Document Library Pro plugin.

User-Submitted Documents

Some WordPress document libraries need their users to be able to upload documents without having access to the WP Dashboard. This might be other staff within your organization, or it might be the general public.

Either way, you can do this by using Document Library Pro with the Gravity Forms plugin. Create a ‘Submit Document’ form on the front end of your website (either on a public or a private page). Users submit files, which are then added to the document library.

Barn2 Plugins has provided a tutorial about how to allow user-submitted documents.

Front End Document Management

You might want people to be able to edit items in the WordPress document library from the front end too. You can do that by using Document Library Pro with the WP Sheet Editor plugin.

The way it works is that you add an ‘Edit’ button to your document library pages. You can either show this to everyone, or to specific user roles only (e.g. so that your employees can see it). When they click the button, the document library opens in a spreadsheet-style table so that you can edit the content in each cell.

Again, Barn2 has provided a tutorial about how to add front-end editing to the document library.

Create Your WordPress Document Library

The WordPress Document Library Pro plugin is exclusively a premium plugin.

While there are some free options listed in the WordPress plugin repository, I haven’t found any that are as flexible or well-documented. I think Document Library Pro is worth its price tag, which is…

  • 1 site – $79
  • 5 sites – $139
  • 20 sites – $279

And that wraps up my guide on how to use Document Library Pro to build your WordPress document library.

Gaby Abela

Gaby is the Product Manager at RebelCode. An architect by profession and designer by nature, she is dedicated to helping users and readers alike to navigate the online world of WordPress. You can find her on Twitter @GabyAbela.

Discover more from our archives ↓

Popular articles ↓

6 Responses

  1. Hi
    Is there a way to place a link on the document Library that would link directly to a URL instead of opening a page?

  2. The article stated that it was possible to create separate document libraries for different categories. I would like to do this for my website but am no too sure how to. Any advice on this would be very helpful.

  3. Also, can you tell me how long you think it would take someone who has never done this before?

    thanks,
    Eileen

    1. Hi Eileen, that depends on the level of detail and quantity of items to go into your library, so we can’t say exactly how long it would take you. With that being said, if you get stuck along the way, the plugin’s support teams are very responsive and can help you out along the way.

  4. Hey Colin,
    I’m seeing the same two plugins to complete a document library, but they are all old posts. Can you tell me when you posted this?
    Thanks,
    Eileen

    1. Hi Eileen, this post was first published 2 years ago but kept it updated and we still recommend Posts Table Pro to create any custom document library. In fact, the plugin has since improved as well.

Share Your Thoughts

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

Claim Your Free Website Tip 👇

Leave your name, email and website URL below to receive one actionable improvement tip tailored for your website within the next 24 hours.

"They identified areas for improvement that we had not previously considered." - Elliot

By providing your information, you'll also be subscribing to our weekly newsletter packed with exclusive content and insights. You can unsubscribe at any time with just one click.