Skip to main content

How to Password Protect PDFs in WordPress (Step by Step)

How to Password Protect PDFs in WordPress

Do you want to password protect PDFs on your WordPress site?

There are many benefits to using this file format. It lets you retain the original formatting and look of your document, including images and other non-text elements. You can open PDFs on just about any device or platform and easily share them with others.

Also, these files offer some security features that other formats don’t. For example, you can password protect PDF files so only authorized users can view and use them.

In this post, we’ll show you multiple tutorials. We’ll walk you through how to protect PDFs in WordPress using three methods. We’ll cover:

Why Password Protect PDFs in WordPress?

PDFs are a great option if you sell eBooks or offer other types of downloadable files. If you’re selling digital products, you can password protect your PDFs so that only paying customers or members can access them.

Password protection on PDFs can also keep sensitive information safe and secure. Maybe you have internal documentation for your users or want to keep certain documents private. Regardless, it’s helpful to know how to keep PDFs protected so only approved users can gain access.

Adding a login page can prevent direct access to your files. This can help not only boost security but help drive sales. Password encryption can keep search engines from indexing the PDF document so that unauthorized users without the proper permissions aren’t able to view what you thought were your password-protected pages.

There are a few different ways that you can password protect PDF files in WordPress. In the next sections, we’ll walk you through each option:

  1. Use the WordPress Built-In Page Settings
  2. Install a Plugin to Restrict Content to Members
  3. Password Protect File-Sharing Apps

1. Use the WordPress Built-In Page Settings

One way to password protect PDFs in WordPress is to use the built-in page settings. This feature lets you lock individual posts and pages. It requires a password from users to view and access the WordPress files. To use it, you should first add your PDF file to your site.

Upload the PDF to WordPress

If your PDF file is already uploaded and published to a post or page, navigate to and open that page. If not, go to Pages » Add New from your WordPress admin, then add a title and description for your PDF:

Adding an eBook PDF page in WordPress.

Click on the plus icon (+) in the editor to insert a new block and search for “file.” Select the File block:

Inserting the File block in WordPress.

Next, click Upload:

The upload button in the WordPress File block.

Select the PDF from your computer to upload it. This will embed the file and add a PDF viewer and Download button below it:

A PDF file in WordPress.

If you want to hide the PDF viewer, you can click the Show inline embed option under PDF settings:

The PDF settings from the WordPress File block.

To remove the Download button, you can click the Show download button under Download button settings:

The Download button settings for a PDF file in WordPress.

Enable the Password Protection Page Setting

Whether you want to display the PDF viewer, the download button, or both, you can password protect the entire page. To do this, go to the Status & visibility settings box located under the Page tab:

The Status & visibility settings in a WordPress page.

By default, the Visibility option is set to Public. Click on it, then select Password Protected to change it:

The setting in WordPress to password protect a PDF page.

Next, in the text field, you can enter the password that you want users to use. Keep in mind that you can only set a single password for the page or post. This means that if someone shares the password with another party, they’ll be able to use it as well.

When you’re done, click on Save Draft (or Update/Publish):

The save and publishing options on a WordPress page.

Now, when users arrive on this page, they’ll need to enter a password. Once they enter the correct password, they’ll be able to view and/or download the PDF:

The front-end view of a password protected PDF file in WordPress.

2. Install a Plugin to Restrict Content to Members

Compared to the built-in WordPress page settings functionality, a plugin can offer more options for how you password protect PDFs and other files. For instance, content restriction or membership plugins can help you limit access to logged in users or customers.

Our Easy Digital Downloads (EDD) plugin is a powerful eCommerce solution:

The WordPress and Easy Digital Downloads logos.

You can use it to protect your digital products in WordPress by:

You can also:

Let’s say that you want to protect PDFs so that only people who have purchased a subscription or license can access it.

Download, install, and activate EDD on your site. We recommend getting a premium plan so you have access to all extensions (including Content Restriction and Recurring Payments).

You can add your PDF as a downloadable product under Downloads » Add new:

Adding a new product in EDD.

You can refer to our Creating Products documentation for more guidance.

Next, create or locate the page that contains your PDF file. Under the editor, click to expand the Easy Digital Downloads Content Restriction section:

The option to restrict a page in WordPress with the EDD plugin.

Select the Restrict this page option. Now you’ll see a variety of settings:

The EDD Content Restriction settings.

You can click either Require a valid license key? or Active Subscribers Only? Then you can select the PDF from the Download drop-down menu:

Limiting a PDF download to active subscribers only.

After selecting the PDF, you can enter a custom restriction message in the text field. Finally, click Save draft or Publish.

3. Password Protect File-Sharing Apps

If you use a file sharing app such as Dropbox or Google Drive, you may be able to add a password to your file. This feature is usually only available with premium plans.

Typically, you can upload your PDF file to the platform. Then you can invite specific users by their email addresses to access it.

We’ll walk you through this process using Dropbox as an example. If you don’t already have your Dropbox account set up and linked to EDD, follow our guide on how to use Dropbox and WordPress to sell digital products.

Next, log into your Dropbox account and locate the PDF file (or folder). We’ve added our eBook PDF file to a Downloadable eBooks folder.

Select the file and click on the three vertical dots for More options, followed by Share:

The option to share a PDF file in Dropbox.

Click on Share with Dropbox, then Settings in the popup that appears:

The Share this file settings in Dropbox.

Under Link for viewing, you can change who is able to access the file. Next to Who has access, click the drop-down menu and select People with password:

Using Dropbox settings to password protect PDFs.

Enter the password you want to use, then click on Save at the bottom of the screen:

Setting a password protect option in Dropbox.

Then, you can enter the specific names or emails of people you want to share the file with:

The option to enter emails to share a PDF file in Dropbox.

That’s it! Now you have three methods you can use to password protect PDFs in WordPress.

Conclusion

Password protecting PDFs can help secure your digital files and prevent unauthorized access. Plus, there are multiple methods you can use. You can use the built-in WordPress page settings. Alternatively, for more customizations and control, you can install a WordPress plugin like Easy Digital Downloads that lets you easily configure private files.

This tool offers plenty of options for restricting content and protecting files. To learn more about how you can protect your files, check out our 9 Expert Ways to protect Digital Products (with Pros and Cons)!

Be sure to subscribe to our newsletter or follow us on Facebook and Twitter to get our latest resources for digital creators.

Casey Cavanagh

About Casey Cavanagh

Casey is a Technical Writer for Easy Digital Downloads at Awesome Motive.

Leave a Reply

Your email address will not be published.