Managing PDFs and Other Documents in WordPress
From UMaine Digital Communications
Do you upload PDFs or other documents to your website? If so, you will benefit from using our website’s “resource” feature. Resources are files and web links (URLs) intended for reuse across the site. They can be associated with a specific page, and a link can be displayed in a page or post using a content embed.
Why not use the media library for documents?
The media library in WordPress is the default area for “static content” — documents, images, and other files that are not actively updated or modified by WordPress when they are accessed. WordPress offers the media library for both images and documents by default, but in practice the media library does a poor job of document management. While you can upload a PDF in the same way as images, linking to a file in the media library is not dynamic; if you need to update that PDF in the future, you must track down links to the old document and update those to point to the new one. Search engines that may have indexed the old content will continue to find it unless you actively track down and delete the older copy that is still in the media library.
Use resources to better manage your website’s documents
Resources can be thought of as a container for a document. If you find that a document needs to be updated, you can then open that container and replace the document. Links to that container will point to the new document, keeping links up to date, and old versions of files off the website.
How to create a new resource
Use the Resource menu on the left column of the WordPress dashboard to create a new resource. You can then name the resource in the same way you name pages and posts. If you have a number of resources to maintain and list, an optional feature allows you to designate a resource category. In the Location block, you can upload the document. Unlike the media library’s 1MB file size restriction, resources have a maximum file size of 50MB.
Note, you may instead specify an external URL/link for a resource. In this case, the resource acts as a redirect to the URL you have set.
All of the resources you have created and published are made available in a searchable “resource library.” An example of a resource library can be found on the Office of the President website.
Adding a resource to a page or post
Once you have created your resource, you may add a link to it to any page or post. The most common way to do this is to use the link tool in the text editor. The link tool can be used to search your content by title— simply type in the name you had given your resource, and it should be selectable as the link destination.
Another way to add a resource to a page or post is through the “Add post element” button above the text editor toolbar. If you use this method, the resource will be added in a way that uses the name you had given it, and the resource displays in a large grey highlighted box with a clickable button to go to the resource (view or download a file, or go to the URL).
More information about resources may be found in our user guide. If you have any questions about using resources, please email us at firstname.lastname@example.org.