5 Ways to Protect PDF Documents and Files in WordPress

One of the main hurdles of offering downloadable resources through your WordPress website is preventing unauthorized people from accessing them.

There are a number of ways you can protect PDF documents and files in WordPress depending on the type of access you wish to grant. For instance, you may want to give users temporary access to files or invalidate a password after it’s used once.

In this post, we’ll go over some of the ways you can protect your downloadables and share them with authorized users in a secure way.

Protecting PDF documents and files in WordPress

If you share PDF documents on your WordPress site and want to control who can access them, you need a WordPress plugin that lets you set up different types of access limitations.

For example, you should be able to make a specific number of copies of the documents available to users. Similarly, you should also have the option to grant restricted access to your PDF files or revoke access after a certain time period.

  • Protecting your downloadable documents and files is especially important if you offer content on your membership site. For this, you’ll need to implement content protection and user authentication features on your website.
  • If you do lead generation for your business, you might need to share sensitive data with team members which means only certain user roles (or users) should be able to gain access to this information.
  • If you are part of an intranet site, you need to make sure that unauthorized people can’t download a copy of your PDF documents, images, or software.

Next, let’s take a look at how you can protect PDF documents and files in WordPress.

How to protect PDF documents and files in WordPress (in 5 different ways)

Here, we’ll show you five ways to keep your PDF documents and files secure in WordPress. For this tutorial, you’ll need your WordPress website, the Filr plugin, and the Passster plugin.

Method #1: Password protection

Passster helps you secure parts of your website content. You can use it to protect PDF documents and documents on your WordPress site using a simple shortcode. Depending on your requirements, you can choose to implement single or multiple password protection on your website.

Single password protection

From your WordPress dashboard, navigate to Settings > Passster and select the Shortcode tab.

Protect PDF documents

Configure the following settings:

  • Protection Type. Select Password from the drop-down menu.
  • Password. You can enter the password manually or automatically create a strong password by clicking the Generate Password button.

Click on the Save Changes button. It will automatically generate a shortcode that can be used to restrict access to content on your website’s posts and pages.

Multiple password protection

From your WordPress dashboard, select the Addons tab. Enable the Activate Multiple Passwords option.

Activate multiple passwords in Passster option
Multiple passwords

Click on the Save Changes button to continue.

Next, click on the Passwords Lists tab and click the Add new Password List button. Under Title, enter the name of your password list. In the Passwords textbox, enter a list of passwords, separated by commas.

List of passwords

Note: Setting the Expire Passwords option to Yes enables you to create one-time passwords that will automatically be removed from the passwords list once they’re used.

Click on the Save Password List button.

From here, select the Shortcode tab and select Multiple Passwords in the Protection Type option. Select the password list you just created using the Password List drop-down menu.

Select the password list

Click on the Save Changes button to automatically generate a shortcode. You can use this shortcode to restrict access to posts and pages on your website.

Method #2: Unlock via link

You can use Passster’s Unlock via link feature to grant users direct access to restricted content using an encrypted link. This automatically generated link can be used to direct people straight to a post or page on your website.

Here’s how:

From your WordPress dashboard, navigate to Settings > Passster. Go to the Addons tab and turn on the Activate Unlock via Link option.

Activate unlock via link option
Unlock via link

Click the Save Changes button to continue.

Direct, encrypted link to unlock restricted content

Next, click on the Link tab and configure the settings as follows:

  • Slug. Enter the slug of the page you wish to restrict.
  • Password. Set the password. It will be encrypted automatically in the unlock link
  • Bitly Access Token (Optional). This option lets you shorten the encrypted unlock link using Bitly.

Click the Save Changes button.

You should see an unlock link generated. Share this encrypted link with your site users to grant them direct access to the restricted page or post.

Method #3: Restrict user access

Using Passster, you can give certain user roles (or specific users) access to PDF documents and files. This helps you narrow down the number of users who have access to content on your WordPress site. Here’s how:

Navigate to Settings > Passster and select the Addons tab. Enable the Activate Users option.

Activate users option
Users

Click on the Save Changes button to continue.

Next, select the Shortcode tab and in the User Groups option, enter the list of user roles you’d like to give access to, separated by commas. Alternatively, you can add the names of specific users in the Users option, separated by commas.

User role and users settings in Passster

Click on the Save Changes button and a shortcode will automatically be generated. You can use this shortcode in posts and pages to grant restricted access to specific users (or user roles).

Method #4: CAPTCHA and reCAPTCHA protection

CAPTCHA is a type of verification test that determines whether the user is a human or a bot. reCAPTCHA is also a human verification system that protects your website from spam and other online attacks.

Both CAPTCHA and reCAPTCHA serve the same purpose i.e. they make it difficult for bots to access your website content. However, reCAPTCHA doesn’t offer support for WooCommerce whereas CAPTCHA does.

CAPTCHA

From your WordPress dashboard, navigate to Settings > Passster and select the Addons tab. Enable the Captcha option.

Activate CAPTCHA option

Click on the Save Changes button.

CAPTCHA settings screen in Passster plugin

Next, go to the Captcha tab and configure the settings as follows:

  • Captcha Code Length. Here you can choose how many numbers and letters will be generated in the CAPTCHA image.
  • Width and Height. These options let you enter the dimensions of the CAPTCHA image displayed on your website’s front-end.
  • Background color. Enter the 6 digit color code in the box.
  • Difficulty. You can increase the difficulty of the CAPTCHA image by creating Lines in background and Lines in front.

Removing all the lines and distortion effects from the CAPTCHA imagewill allow people to easily read the CAPTCHA image. You can also choose to Use only numbers in the CAPTCHA image.

Click on the Save Changes button.

Navigate to the Shortcode tab and select Captcha in the Protection Type option.

CAPTCHA shortcode

Click on the Save Changes button. It will automatically generate a shortcode that can be used to protect PDF documents and files on your site.

reCAPTCHA

From your WordPress dashboard, navigate to Settings > Passster and select the Addons tab. From here, toggle on the Google reCAPTCHA option.

Activate Google ReCAPTCHA

Click the Save Changes button to proceed.

Go to the Shortcode tab and select Recaptcha in the Protection Type option.

Shortcode for Google ReCAPTCHA in Passster

Finally, click on the Save Changes button, a shortcode will be automatically created for you. You’ll be able to protect PDF documents and files using this shortcode.

Passster

Protect your entire website, entire pages, or just parts of your content with one or more passwords.

Method #5: Expiring documents

Filr’s expiring documents feature allows you to automatically terminate access to your documents using two different methods – expire documents by date and expire documents by the number of downloads.

From your WordPress dashboard, navigate to Files > Add New and give a title to your file(s) under Add New File.

Use the drag and drop metabox to add the file (or files) you’d like to make available at your site’s front-end. If you add multiple files, Filr will automatically archive them into a single zip file.

You can create a new list for your file(s) or use an existing one. This will be used to display the downloadable resources in a table on your website’s front-end.

Expire documents by date

The Advanced Options meta box in the right-hand panel lets you set Expire by date option. Users will not be able to download the files and documents past this date.

Expire by date using Filr

Click on the Publish button to continue.

Expire documents by the number of downloads

In the Advanced Options meta box on the right, you’ll find the Expire by downloads option. Here you can set the number of times your file or set of files can be downloaded.

Expire by downloads

Click on the Publish button to continue.

You can show the downloadable files on the front-end by creating a new page and entering the [filr list=”list-name”] shortcode in a shortcode block.

Conclusion

By using Filr and Passster, you’ll be able to protect PDF documents and files on your site in a variety of different ways.

To recap:

  • Adding password protection to your website enables your site users to access the PDF documents and files by entering the correct password.
  • Unlock via link is a great way to authorize users to access files and documents without requiring them to enter a password.
  • You can restrict access to specific users or user roles using Passster.
  • CAPTCHA and reCAPTCHA are human verification tests that keep bots and spammers from accessing PDF documents and files on your site.
  • Document expiry features help you control access to your site content based on a set expiry date or the total number of file downloads.

Filr

Easily upload, store and share files in WordPress. Secure, flexible, and user-friendly document libraries for your next project.