1. Home
  2. Knowledge Base
  3. General
  4. File and Folder Protection Issues on an Nginx Server

File and Folder Protection Issues on an Nginx Server

If you’re experiencing issues with File and/or Folder Protection and are running on an Nginx server (you can contact your host if you’re unsure if your server is running Nginx), you can do the following:

Add the following line to your Nginx site configuration’s server {} block:

include [path to wp-content/uploads]/wlm_file_protect_nginx.conf;

Note: You will need to switch out “path to wp-content” with the actual server path. If you are not sure how to do this, please contact your host and they can assist you. They should be able to handle that for you.

WP Engine – Cache Exclude

If your site is hosted with WP Engine and you find the files are not being protected as expected, there are some adjustments WP Engine can make on their side.

Files you want to protect must have the following prefix:

   protected-

Example: integration-instructions.pdf must be changed to protected-integration-instructions.pdf

You will also need to ask WP Engine to Not cache files with the protected- prefix on the file name.

Example: Caching should not be applied to a file named like the following: protected-integration-instructions.pdf

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support