{"id":2440,"date":"2008-01-30T00:30:02","date_gmt":"2008-01-30T00:30:02","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/private-files\/"},"modified":"2016-11-24T10:29:40","modified_gmt":"2016-11-24T10:29:40","slug":"private-files","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/private-files\/","author":288652,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.40","stable_tag":"0.40","tested":"2.8.4","requires":"2.0.2","requires_php":"","requires_plugins":"","header_name":"Private Files","header_author":"James Low","header_description":"","assets_banners_color":"","last_updated":"2016-11-24 10:29:40","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_xclick&business=donate%40jameslow%2ecom&item_name=Donation%20to%20jameslow%2ecom&currency_code=USD&bn=PP%2dDonationsBF&charset=UTF%2d8","header_plugin_uri":"http:\/\/jameslow.com\/2008\/01\/28\/private-files\/","header_author_uri":"http:\/\/jameslow.com","rating":0,"author_block_rating":0,"active_installs":20,"downloads":10722,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1","0.2","0.3","0.31","0.32","0.33","0.34","0.35","0.36","0.37","0.38","0.39","0.40"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[88,8024,20650,870,7686],"plugin_category":[54,58],"plugin_contributors":[79029],"plugin_business_model":[],"class_list":["post-2440","plugin","type-plugin","status-closed","hentry","plugin_tags-files","plugin_tags-in","plugin_tags-logged","plugin_tags-private","plugin_tags-proxy","plugin_category-security-and-spam-protection","plugin_category-user-management","plugin_contributors-jamesdlow","plugin_committers-jamesdlow"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/private-files.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>There are several plugins to make a blog private, making it a good tool for basic collaboration \/ group ware. However file attachments \/ images have still been visible too the public, until now.<\/p>\n\n<p>Private files acts as a proxy, making sure users are logged in before they can download any files. The nice thing about is, it doesn't modify the current uploads at all, doesn't store files in a different place, so if you want to stop using it, all links to files stay the same, so you don't need to redo anything.<\/p>\n\n<p>How this plugin works<\/p>\n\n<p>1) It requires mod_rewrite\/php running in apache, probably on unix\/linux, although windows may work.<\/p>\n\n<p>2) It requires wordpress to be handling all url requests via a .htaccess in your blog root, and for your uploads to be a subdirectory of the your blog root and you're not using the default permalinks (ie. not http:\/\/www.myblog.com\/?p=123)<\/p>\n\n<p>3) An additional .htaccess file is placed in your uploads directory with the following content:<\/p>\n\n<pre><code>RewriteEngine On\n\nRewriteBase \/wordpress\/wp-content\/uploads\n\nRewriteRule . \/wordpress\/afilethatshouldnotexist.txt\n\nOptions -Indexes \n<\/code><\/pre>\n\n<p>4) All requests for files within your upload are direct to a file that doesn't exist<\/p>\n\n<p>5) Wordpress handles this as a 404 error<\/p>\n\n<p>6) This plugin has a hook which intercepts the 404, and returns the file if the user is logged in.<\/p>\n\n<p>7) If you want to force user login please try Angsuman's Authenticated WordPress Plugin (http:\/\/blog.taragana.com\/index.php\/archive\/angsumans-authenticated-wordpress-plugin-password-protection-for-your-wordpress-blog\/) or Allow Categories (http:\/\/jameslow.com\/2007\/12\/02\/allow-categories\/) to permission your blog.<\/p>\n\n<p>8) There's a small chance that the protection detection might be wrong, if so reprotect your files.<\/p>\n\n<p>9) If you want to stop using the plugin, unprotect it, or delete the .htaccess file with your uploads directory.<\/p>\n\n<p>More information and the latest version can be found here:\nhttp:\/\/jameslow.com\/2008\/01\/28\/private-files\/<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Download privatefiles.php and place in wp-content\/plugins<\/li>\n<li>Log into your WordPress admin panel<\/li>\n<li>Go to Plugins and \"Activate\" the plugin<\/li>\n<li>Go to Manage-&gt;Private Files and click protect<\/li>\n<\/ol>","raw_excerpt":"Private Files makes sure only logged in users can see images and file attachments.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/2440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=2440"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/jamesdlow"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=2440"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=2440"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=2440"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=2440"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=2440"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=2440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}