Title: PTP Private Media
Author: Umang Prajapati
Published: <strong>জুন 18, 2026</strong>
Last modified: জুন 18, 2026

---

প্লাগিনৰ সন্ধান কৰক

![](https://ps.w.org/ptp-private-media/assets/banner-772x250.png?rev=3579966)

![](https://ps.w.org/ptp-private-media/assets/icon-256x256.png?rev=3577693)

# PTP Private Media

 [Umang Prajapati](https://profiles.wordpress.org/umangapps48/)-ৰ দ্বাৰা

[ডাউনল’ড কৰক](https://downloads.wordpress.org/plugin/ptp-private-media.1.0.0.zip)

 * [বিশদ বিৱৰণ](https://as.wordpress.org/plugins/ptp-private-media/#description)
 * [পৰ্য্যালোচনা](https://as.wordpress.org/plugins/ptp-private-media/#reviews)
 *  [ইনষ্টলেশ্যন](https://as.wordpress.org/plugins/ptp-private-media/#installation)
 * [বিকাশ](https://as.wordpress.org/plugins/ptp-private-media/#developers)

 [সাহায্য](https://wordpress.org/support/plugin/ptp-private-media/)

## বৰ্ণনা

**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](https://phptutorialpoints.in/) | [WordPress Profile](https://profiles.wordpress.org/umangapps48/)
| [GitHub](https://github.com/umang48/secure-media-vault)

#### Core Features

**🔐 Media Protection System**
 * Prevent direct URL access to files in `/wp-content/
uploads/` * Files are served through a secure PHP handler, not exposed directly *
Automatic `.htaccess` rules block direct file access on Apache servers * Guidance
provided for Nginx configurations

**👥 Fine-Grained Access Control**
 Set a protection level for every file in the
Media Library:

 * **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

**🔗 Secure File Delivery**
 * Replace original media URLs with HMAC-signed, time-
limited token URLs * Format: `example.com/ptp-restricted-media/{file-id}/{token}/`*
Configurable token expiry (default: 1 hour) * Hotlink protection prevents embedding
on external domains * Optional IP-address binding for 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

**📂 Media Library Integration**
 * Protection Settings panel on every attachment
edit screen * Protection status column (`Protected / Public / Password / Role`) 
in list view * Bulk Actions: protect multiple files, change access rules, make public

**⚡ Performance**
 * Chunked streaming with HTTP Range support for large video/
audio files * Configurable file-size threshold for streaming vs. single-pass delivery*
Object cache support with cache invalidation on settings change * Scheduled cleanup
of expired tokens and old access logs

**🛡️ Security**
 * HMAC-SHA256 signed tokens using WordPress secret keys * Nonce
verification on all AJAX requests and form actions * All input sanitized and output
escaped per WordPress standards * No direct file inclusion; `ABSPATH` check on every
file * Clean uninstall via `uninstall.php`

#### Nginx Support

While `.htaccess` rules are written automatically for Apache, the plugin provides
the correct Nginx configuration block in the admin dashboard for manual setup.

#### WooCommerce Compatibility

The access control system is designed to work alongside WooCommerce. Future versions
will include native purchase-based access checks.

## ইনষ্টলেশ্যন

 1. Upload the `ptp-private-media` folder to `/wp-content/plugins/`.
 2. Activate the plugin through the **Plugins** screen.
 3. Visit **PTP Private Media  Settings** to configure your default options.
 4. Open any media file in the **Media Library** and set its protection level.
 5. If using Nginx, add the server block rules shown in the **Dashboard**.
 6. Re-save your **Permalink Settings** (`Settings  Permalinks`) if secure URLs return
    404.

## সঘনাই উত্থাপিত প্ৰশ্ন

### Will this break my existing media URLs?

Only files you explicitly protect will have their URLs replaced. Public files continue
to behave normally.

### Does it work with Nginx?

The PHP-level access control works on any web server. On Nginx, add the configuration
rules shown in the Dashboard to block direct file access at the server level.

### What happens if a token expires?

The user will receive an “Invalid or expired access token” message. Generate a new
secure URL from the Media Library.

### Can I use it with a CDN?

CDN bypass is possible for public files. For protected files, disable CDN caching
or ensure the CDN forwards requests to WordPress for validation.

### Does this affect site performance?

Large files are streamed in 1 MB chunks with HTTP Range support, so memory usage
stays low even for large videos.

### Will protected files still be indexed by Google?

No. The plugin sends `X-Robots-Tag: noindex, nofollow` on every protected-file response
and disables media attachment pages.

## পৰ্য্যালোচনা

এই প্লাগিনৰ বাবে কোনো পৰ্য্যালোচনা নাই।

## অৱদানকাৰী আৰু বিকাশকাৰীসকল

“PTP Private Media” হৈছে মুক্ত উৎসৰ ছফ্টৱেৰ। এইসকল লোকে এই প্লাগিনত অৱদান আগবঢ়াইছে।

অৱদানকাৰীসকল

 *   [ Umang Prajapati ](https://profiles.wordpress.org/umangapps48/)

[আপোনাৰ ভাষাত “PTP Private Media” অনুবাদ কৰক।](https://translate.wordpress.org/projects/wp-plugins/ptp-private-media)

### বিকাশৰ প্ৰতি আগ্ৰহী?

[ক’ড ব্ৰাউজ কৰক](https://plugins.trac.wordpress.org/browser/ptp-private-media/),
[SVN ৰিপজিটৰী](https://plugins.svn.wordpress.org/ptp-private-media/) চাওক নাইবা 
[RSS](https://plugins.trac.wordpress.org/log/ptp-private-media/?limit=100&mode=stop_on_copy&format=rss)-
দ্বাৰা [বিকাশৰ পঞ্জী](https://plugins.trac.wordpress.org/log/ptp-private-media/)
ছাবস্ক্ৰাইব কৰক।

## সলনি-পঞ্জী

#### 1.0.0

 * Initial release.
 * Media protection with `.htaccess` rules and Nginx guidance.
 * Per-file access control: public, logged-in, roles, password, posts.
 * HMAC-SHA256 signed, time-limited token URLs.
 * Hotlink protection and IP-binding option.
 * SEO protection: X-Robots-Tag, robots.txt rules, attachment page redirect.
 * Chunked file streaming with HTTP Range support.
 * Bulk protect/unprotect actions in the Media Library.
 * Access logging with configurable retention.
 * Clean uninstall removes all data.

## মেটা

 *  **1.0.0** সংস্কৰণ
 *  **1 মাহ আগত** শেষবাৰ আপডে’ট হৈছিল
 *  সক্ৰিয় ইনষ্টলেশ্যন **10টাতকৈ কম**
 *  WordPress-ৰ সংস্কৰণ ** 6.0 বা তাতকৈ ওপৰৰ **
 *  ইমানলৈকে পৰীক্ষা কৰা হৈছে **7.0.2**
 *  PHP-ৰ সংস্কৰণ ** 7.4 বা তাতকৈ ওপৰৰ **
 *  ভাষা
 * [English (US)](https://wordpress.org/plugins/ptp-private-media/)
 * [media library](https://as.wordpress.org/plugins/tags/media-library/)[secure files](https://as.wordpress.org/plugins/tags/secure-files/)
 *  টেগবোৰ
 *  [উচ্চখাপৰ ভিউ](https://as.wordpress.org/plugins/ptp-private-media/advanced/)

## ৰে’টিংবোৰ

এতিয়ালৈ কোনো পৰ্য্যালোচনা দাখিল কৰা হোৱা নাই।

[Your review](https://wordpress.org/support/plugin/ptp-private-media/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/ptp-private-media/reviews/)

## অৱদানকাৰীসকল

 *   [ Umang Prajapati ](https://profiles.wordpress.org/umangapps48/)

## সাহায্য

কিবা ক’বলগীয়া আছে? সহায় লাগে?

 [সাহায্যৰ ফ’ৰাম চাওক](https://wordpress.org/support/plugin/ptp-private-media/)

## দান কৰক

আপুনি এই প্লাগিনৰ উন্নতিৰ প্ৰতি সাহায্য আগবঢ়াব বিচাৰেনে?

 [ এই প্লাগিনক অনুদান দিয়ক ](https://phptutorialpoints.in/)