• Resolved agustinbitbug

    (@agustinbitbug)


    I need the files on my site, such as PDF documents, etc., to only be accessible by the corresponding users limiting its access because currently with only the URL of the file it can be accessed from any browser, whether logged in or not. This also includes that the URL that WordPress gives you for the file is also protected. Would this plugin meet the needs I have?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author WP Folio Team

    (@buildwps)

    Hi @agustinbitbug ,

    Thank you for reaching out to us.

    If I understand correctly, you can use the feature Restrict WordPress Files Access by IP Addresses of our plugin to meet your requirement.

    To use this feature, you will need our PDA Gold plugin and PDA Access Restriction extension

    By whitelisting their IP addresses, you can grant them permission to access your protected files without any login requirement.

    You can also set up restrict all your files or restrict individually file on your Media Library.

    For?faster assistance from our team, please email us at support(at)wpfolio.com

    Thread Starter agustinbitbug

    (@agustinbitbug)

    I already saw that they have what I need but I have one more question. Is it possible to create different folders to store files on media and apply the role conditions to the folder? I think this would be easier for my client than going file by file.

    Plugin Author WP Folio Team

    (@buildwps)

    Hi @agustinbitbug ,

    Yes, it’s possible to create different folders to store files on Media and apply the role conditions to the folder.

    You just need define your new access permission rules by adding them into wp-config.php file.

    define('PDA_FOLDER_PROTECTION',
    	[
    		[
    			'folder' => 'folder-A',
    			'permission' => array('administrator', 'editor'),
    		],
    		[
    			'folder' => 'folder-B/01',
    			'permission' => 'logged_in_users'
    		],
    	]
    );

    References: https://preventdirectaccess.com/docs/set-file-access-permissions-wordpress-folders/#roles

    Let us know if it works.

    Thread Starter agustinbitbug

    (@agustinbitbug)

    Great but also notice this “Go to Prevent Direct Access Gold settings page and click on “Save Changes” button to add this rule into your .htaccess file. You need to do it whenever you update the folder in the wp-config.php file .”. This means that after adding an image to a folder the changes have to be saved there or it refers to changes in the PDA_FOLDER_PROTECTION configuration

    Plugin Author WP Folio Team

    (@buildwps)

    Hi @agustinbitbug ,

    It doesn’t mean that after adding an image to a folder you have to be saved,

    You just need to be save when you change access permission rules by adding them into wp-config.php file.?

    Let us know if it works

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Files URL protection and based on user roles’ is closed to new replies.