
PTP Private Media
v1.2.1Umang Prajapati · 2026年6月18日 上架
Protect WordPress media files with access controls, secure delivery, temporary share links, and SEO indexing protection.
- 正在使用
- 10+
- 评分
- 1.0 / 5
- 累计下载
- 743
- 最近更新
- 2026年11月22日
贡献者
PTP Private Media gives you full control over who can access your WordPress media files. Stop search engines, bots, and unauthorised visitors from downloading your protected images, PDFs, videos, or documents.
Author: Umang Prajapati | WordPress Profile | GitHub
Core Features
🔐 Real Server-Level Media Protection
* Automatically writes per-file .htaccess rules to block direct /wp-content/uploads/ access to every protected file and all its generated thumbnail sizes
* Built-in Direct File Protection Self-Test on the Dashboard verifies live whether direct access is blocked
* Public files continue to be served natively by Apache with zero PHP overhead
* Copy-paste Nginx configuration rules provided in the Dashboard
👥 Fine-Grained Access Control
Set a protection level for every file in the Media Library or Block Editor:
- Public – standard WordPress behaviour
- Logged-in users only – any authenticated user
- Specific roles – choose from all registered WordPress roles (Admin, Editor, Subscriber, etc.)
- Password protected – custom password per file
- Restrict to posts/pages – only accessible when referred from specific content
🔗 Permanent Embedded URLs + Optional Temporary Share Links
* Embedded media in posts, pages, and blocks uses a permanent dynamic endpoint (example.com/restricted-media/{file-id}/) that never expires and checks user permissions live on every request
* Optional Temporary Share Links (example.com/restricted-media/{file-id}/{token}/) let you generate HMAC-SHA256 signed, time-limited links when sharing externally
* Hotlink protection prevents embedding on external domains
* Optional IP-address binding for temporary share tokens
🚫 SEO & Indexing Protection
* X-Robots-Tag: noindex, nofollow header on all protected file requests
* Optional Disallow entries in robots.txt for the uploads directory
* Disable and redirect WordPress media attachment pages
* wp_robots API integration for attachment pages
📂 Seamless Media Library & Block Editor Integration
* Single, unified Protection Settings panel in the Media Library Grid popup, Block Editor sidebar, and Classic Attachment Edit screen
* Auto-saves settings when changing Access Type or Allowed Roles
* Protection status column (Protected / Public / Password / Role) in list view
* Bulk Actions: protect multiple files, change access rules, make public
⚡ Performance
* Full HTTP Range (206 Partial Content) streaming support for HTML5 video and audio seeking of any size
* Chunked streaming for large files above configurable threshold
* Object cache support with cache invalidation on settings change
* Scheduled cleanup of expired tokens and old access logs