Prevent files / folders access


WordPress Prevent files /folders access provides an easiest way to protect your wordpress files from public users so that your content can be accessed only by WordPress logged in users.

For restricted access you can choose to redirect users to 403 forbidden page, your custom page, SSO login page (if you are using OAuth or SAML SSO).

No change required or no manual work needed to create a private link to protect your files. Our plugin take care of everything.

We support any level of customization according to your requirement.

File Based Protection

WordPress Prevent file/folder access developed in a way that it allows you to protect many types of files in your customized way. It will protect files based on their extension.
You can protect file types below:

  • Images – Every type of image files can be protected. eg: jpeg, jpg, gif, png, bmp, webp, pfg, ico, psd, etc.
  • Videos – Every type of video files can be protected. eg: mp4, m4a, m4v, f4v, f4a, m4b, m4r, f4b, mov, 3gp, avi etc.
  • Documents – Every type of document files can be protected. eg: doc, docx, html, pdf, txt, ppt, xls, xlsx, pptx, odt.


WordPress Prevent file/folder access allows you to customize redirect option after the files restriction.

  • 403 forbidden page (DEFAULT) – Users will be shown with 403 forbidden page with restricted access messasge.
  • Display custom page – We can redirect users to any WordPress custom page when they try to access a restricted files or folders.
  • WordPress login – Users will be redirected to the WordPress default login page.
  • IDP login – Users will redirect to the selected IDP (SAML/OAuth) login page and after IdP authentication they can see the restricted content.

Protected folder

  • Our plugin also gives you a protected folder where you can add all file type extensions and restriction will be applied to all files inside protected folder.

Folder Based Protection

  • WordPress Prevent files / folders access allows you to protect your folders too, the wp-content or uploads folder where all the media files like image, video and document files stored will also be protected.
  • Users have option to protect particular month’s media files.

You can customize the restriction rules and use it as per needs.

Capturi ecran

  • Configuration
  • Permission to update htaccess file
  • Rules preview based on configuration
  • Upload files in protected folder
  • Folder based restriction
  • Contact us or support

Întrebări frecvente

I need to customize the plugin or I need support and help?

Please email us at or Contact us. You can also submit your query from plugin’s configuration page.


18 martie 2020
Awesome plugin, it works flawlessly. And thumbs up for the support.
18 februarie 2020
We have an issue before as the PDF file we wanted to restrict without logging in is still shareable. The PDF file should not be accessed directly anymore without logging in but the Support was very responsive and fixed the issue.
11 februarie 2020
When I install this plugin on the website, it's not working. The protected files still can be opened directly with URL. The website is on a Windows Server, using IIS. I guess it maybe the issue but I can't finger out how to fix it. Tried contact them for help without hope, because it's a free plugin. But I got response in an hour, and a tech guy took 1 day to fix all issues. Thank you a million, you are the best.
27 decembrie 2019
Thanks a lot for this plugin. Unlike similar plugins, there is no restriction on the number of files or folders you can protect. It protects LOTS of file types, image types, document types and more, or you can protect by folder instead. Settings are easy to understand, and there aren't too many of them. It could maybe be a little clearer that you still have to save the settings, even if you are accepting the defaults. Also, I appreciated the option to edit .htaccess myself rather than having the plugin do it. I let the plugin do it, but backed up .htaccess first. A button to quickly do that might be a good addition to the plugin if it isn't too hard to do.
26 decembrie 2019
I would recommend this plugin if you are seeking to protect files (by extension) from visitors. I have a very complicated theme, with over 60 plugins and this one delivers - it's light and doesn't bog down your load times (able to get load time under 900ms without using gzip, page caching, etc. as I'm still building website - but expect that 900ms to drop to 750ms or less in the future with the right tweaking). I did have issues with it breaking the website, originally, but support was there and I was willing to be patient and try different options the plugin offered. For me, protecting all current and future PDF's (that members will upload) needed to be protected from viewing, unless they are logged in, and this where the plugin came in. My finally htaccess code that the plugin injected (through plugin options) was this: # BEGIN MINIORANGE MEDIA RESTRICTION RewriteCond %{REQUEST_FILENAME} ^.*(pdf)$ [OR] RewriteCond %{REQUEST_URI} protectedfiles RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC] RewriteRule ^(.*)$ ./wp-login.php?redirect_to=$1 [R=302,NC] # END MINIORANGE MEDIA RESTRICTION Basically, protect all PDF's from visitors, but opens up for logged in members. Thanks for the great plugin and support. JJ
Citește toate cele 7 recenzii

Contributori și dezvoltatori

„Prevent files / folders access” este un software open-source. La acest modul au contribuit următoarele persoane.


Istoric modificări


  • Fix file permissions issue for the protected folder


  • Fix the Bootstrap conflict with the WP-admin and Permission issue


  • Change method of writing rules in htaccess file


  • File Deletion issue fixed


  • Initial release