Linked Questions

2 votes
3 answers
1k views

Using "wordpress_logged_in" to restrict direct access to uploads folder in 2021

I am looking at ways to restrict direct access to the Wordpress Uploads folder. I've read a handful of Stackoverflow and blog posts about using "wordpress_logged_in" in .htaccess to check if ...
Work-Together2013's user avatar
1 vote
1 answer
839 views

Restrict uploaded files into a custom folder to logged in users by htaccess: looking for Nginx - not only Apache - solution

Talking about this well known solution: Github Original discussion I'm looking for a straightforward way working also on a Nginx installed WP and not only on Apache ones. Is there any other code-based ...
PatrizioRD's user avatar
0 votes
1 answer
887 views

How to Protect a private folder inside uploads folder, if User is not Logged In?

I am learning php but i am still quite a noob so please excuse my limitations. I have a html file that is linked to many PDF files inside a folder called "Clients" I have placed this folder inside "...
Driv3r333's user avatar
0 votes
1 answer
73 views

Rrestrict access to static pages if user is not logged in

I have a folder on my WordPress site (named documentation; see screenshot), where I host a bunch of static HTML pages. How can I restrict access to the folder, so only logged in users are allowed to ...
Luke Wage's user avatar
  • 101
0 votes
0 answers
24 views

Private Custom Post Type for a Blog? [duplicate]

Just wondering if anyone can point me in the right direction please, it may not be possible - but just thought I'd ask incase. I currently have a marketing website for a school campus, within that ...
M.T's user avatar
  • 35
1 vote
0 answers
110 views

File Upload Permissions

Introduction: I want that a logged-in user can upload a file. Then he should be able to download that file whenever he wants to. I have finished the uploading by using wp_upload_bits - so the files ...
QuickSort's user avatar
  • 161
6 votes
1 answer
12k views

Protecting direct access to PDF and ZIP unless user logged in (without plugin)

Working on a WordPress support site which has registered only user content, including uploaded PDF and ZIP files. I'm looking for a way to prevent direct access to those PDFs and ZIP files inside the ...
d38's user avatar
  • 83
1 vote
1 answer
71 views

Protecting uploads not working

I am trying to build a private site. One of the most important aspects of the site consists in the uploads, and they definitely need to be private. I found a very interesting topic on that here: How ...
Cedric Buron's user avatar
0 votes
1 answer
2k views

Restricted images only for logged user. (hidden url)

Im looking for way to create page where only logged in user can see images, but images cant be index by browser, cant be accessed by not logged in user. Simply, if logged in user copy image link, ...
Isu's user avatar
  • 377
0 votes
1 answer
193 views

Restrict directory listing to only logged in users

I am using directory listing with http://adamwhitcroft.com/apaxy/ theme. Which is obviously not part of WordPress. I am looking for a way to allow only registered subscribers to access + download ...
bran's user avatar
  • 177
2 votes
1 answer
4k views

Block Logged-Out User Access to Directory Outside of WordPress using .htaccess and PHP file

I have successfully blocked access to a folder directory outside of WordPress based on user cookies using the following code in the .htaccess file: # BEGIN WordPress <IfModule mod_rewrite.c> ...
melissa's user avatar
  • 21
1 vote
0 answers
332 views

How to protect specific uploaded files from being accessed by non-logged-in users in WP-multisite

I have a question that I thought the below thread would provide the answer to, but things in WP have changed so it doesn't quite do it, although it helped my understanding of things. How to protect ...
yms's user avatar
  • 21
0 votes
2 answers
54 views

How to prevent people from seeing an attachment to a scheduled post that's released in future?

I'm developing a website for a large corporation. They release financial documents on specific dates and times. I've developed a custom form to upload these pdfs to articles, and custom loops that ...
Jonathan's user avatar
  • 123
4 votes
2 answers
10k views

Password protect some uploaded files, so only logged-in users can view them

I would like to protect some uploaded files, so that they are not publicly accessible (they are not accessible without a login). I'm uploading some PDF files, and I'd like to mark some of them as ...
D.W.'s user avatar
  • 215
12 votes
1 answer
17k views

simple solution for restricting access to (some) uploads/downloads

Initial Situation For a site I'm setting up I was looking into the whole field of securing uploads/downloads and restricting access to them based on user roles/capabilities. Of course I have read ...
Nicolai Grossherr's user avatar

15 30 50 per page