• Hello!

    We have a WordPress website on a shared SiteGround hosting server. We have files in a folder in our WP file directory (i.e. /wp-content/testfolder/test.html) that we’d like to prevent access to unless you are logged into our site. We are using UltimateMember to manage our gated pages and posts, but they do not offer a way to protect files in folders on the directory.

    We tried the plugins “Prevent Files / Folder Access” and “Prevent Direct Access” but both of those require writing rules in the website’s Nginx config file on the server level which we do not have access to. We have also tried writing rules in the .htaccess file and those don’t seem to work.

    Do we have any other options? Thank you in advance!

    • This topic was modified 3 years, 1 month ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator t-p

    (@t-p)

    We tried the plugins “Prevent Files / Folder Access” and “Prevent Direct Access” but …

    I recommend asking in those plugins’ support so the plugin’s developers and support community can help you with this.

    Thread Starter lisamr

    (@lisamr)

    Hi t-p,

    Thank you for the response! Both of those plugins require us to make changes on the server level and we can’t do that unless we upgrade our hosting plan to a private server. I was in contact with support of the “Prevent Files / Folder Access” plugin but they couldn’t help without us changing servers. Any other ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to restrict access to files in directory to logged-in users only?’ is closed to new replies.