A blue back ground displays the logo for prevent direct access and the title "protect wordpress files now!"

How to to Protect WordPress Files

Protecting WordPress files is a priority for any WordPress site owner that values their intellectual property and site security. Password-protecting sites and private documents is useful when you don’t want certain pages to be seen by search engines or directories.

Fortunately, there are steps you can take to ensure that your website remains safe from malicious hackers. In this article, we will look at how to protect your WordPress site with the Prevent Direct Access plugin.

Proudly recognized as the #1 security plugin to protect WordPress file access, Prevent Direct Access (PDA Gold) provides customers with simple, single-click methods to protect assets easily. There’s no need to code or complicate things, especially when life is already complicated enough.

Let’s check out the following simple steps to protect your site with PDA Gold:

1. Single-Click to Protect

To start off, the simplest way to use the plugin is by protecting individual items.

Go to the Media Library in List View, select the item you want, then click on Protect. To continue protecting, scroll down the list and click the Protect button on each applicable item.

After protecting the digital products, you can decide which user roles can access the files in the Prevent Direct Access tab.

Unwanted users will be sent to a 404 message screen by default. You can also choose to send users to a login screen.

Download links are also automatically created to enable private sharing. These links can be customized and set to expire or restrict certain IP addresses.

A screenshot displays the WordPress Media Library screen with a media item called "Animal" and a highlighted button that says "protect".

2. WordPress Media Library Attachment Page

When choosing an attachment to add to a WordPress page or post, you can protect individual files through the Attachment page.

On the Attachment page, find the Prevent Direct Access section then click on “Protect this file”. The level of protection can then be determined by file type or by user type. Private links are also created automatically for private sharing.

The media file "animal" shows on the screen with a highlight around the Prevent Direct Access tab and a button that says "protect this file".

3. PDA Gold Protection Pop-Up

To check the status of private files, or to protect new assets, you can check the Configure file protection pop-up.

Step 1: Under WordPress Media Library List View, click on Configure file protection

A screenshot shows the WordPress Media Library page and a media file with the name "animal". The option "configure file protection" is highlighted.

Step 2: The pop-up will show if the item is protected or not. If not, click on “Protect this file”

A screenshot shows the Prevent Direct Access tab with a red arrow pointing to the option "protect this file"

4. Media Thumbnail in the Media Library Grid View

If you prefer to use the grid view in the Uploads folder or the Media Library, you can protect items using the edit button on each thumbnail.

Step 1: Click on the thumbnail you want to protect

A screenshot shows the WordPress Media Library in grid view with a red arrow pointing to the media item "animal"

Step 2: Under Prevent Direct Access, click Protect this file

A screenshot shows the media item "animal" and the attachment details page. The Prevent Direct Access Gold tab is highlighted with a red arrow.

5. Editing Pages or Posts

If you have already added certain digital files to a page or post, you can still protect the file and restrict access while editing the page.

Click on the item and look for the Prevent Direct Access tab on the right-hand side then click on “Protect this file”.

When a file is protected, an automatic private download file URL is created for sharing the item with outside users, if needed.

The WordPress Media Library in grid view with the media item "animal" selected and a red arrow pointing to the checkbox "protect this file"

6. Use the “Auto-Protect New File Uploads” Feature

If you want all new versions, documents, PDF files, or items protected from attacks, use the Auto-Protect feature rules to ensure newly added items are automatically safe.

Simply enable the “Auto-Protect New File Uploads” feature on the Settings page of PDA Gold to automatically protect all new uploads.

You determine which roles count as unauthorized users and which uploaded content will be protected in the future.

A screenshot show the Prevent Direct Access tab with a highlight around the toggle button "Auth-protect new file uploads"

When this feature is turned on, you do not have to do anything to protect your new uploads. The items will all be protected by default. How cool is that?

While this option is very useful, sometimes you may prefer to protect only certain files during media uploads. That’s when you need file protection on the fly.

Is your WordPress site vulnerable? Check up on your site security and how you can protect digital assets with Prevent Direct Access.