Protect media files in WordPress — every format, every use case
Need to protect PDF files, documents, or other media in WordPress? Media Guard blocks PDF downloads, printing, and unauthorized sharing for PDFs, eBooks, video, audio, documents, and 30+ other formats. One plugin handles file access control for membership sites, course platforms, WooCommerce stores, and internal teams.
Selling files? See how to block PDF downloads in WordPress with WooCommerce.
Built for anyone who needs WordPress file protection
If you publish, sell, or share files through WordPress and need to control who can view them — this is the plugin.
eBook & digital publishers
Protect PDF and EPUB downloads from unauthorized redistribution. Readers view in a hardened browser viewer with watermarks — the file never touches their hard drive. Ideal for selling guides, reports, whitepapers, and digital books through WordPress or WooCommerce.
Online courses & LMS
Protect video lessons, course PDFs, slide decks, and workbooks behind role-based access. Works with LearnDash, LifterLMS, MemberPress, and any plugin that assigns WordPress roles. Gate each module to a different student group.
Audio & podcast producers
Protect audio files from downloading and link sharing. Serve premium podcast episodes, audiobooks, and sound packs through a secure player that streams without exposing a download URL. Watermark each listener's stream with their email.
Video content & screencasts
Protect video files in WordPress without a third-party hosting service. MP4, WEBM, and OGG videos stream through an authenticated endpoint — no direct file access. Combined with role or purchase gating, only paying viewers can watch.
Membership & subscription sites
Gate media files to WordPress roles assigned by membership plugins — MemberPress, Paid Memberships Pro, Restrict Content Pro, Ultimate Member, or WooCommerce Subscriptions. Members see their files; everyone else sees a login or purchase prompt.
Internal teams & client portals
Share SOPs, training manuals, brand guidelines, contracts, and sensitive documents with staff or clients — protected from downloading and forwarding. Assign access by WordPress role and track every file view in the access log.
WooCommerce digital products
Replace WooCommerce's unprotected download links with server-denied, viewer-streamed files. Customers view what they purchased — they can't download, print, or share the URL. The [mediaguard_library] shortcode builds a personalized download portal automatically.
Document protection & compliance
Protect sensitive documents in WordPress — contracts, financial reports, HR policies, and compliance materials. Watermarks identify the viewer, access logs create an audit trail, and server-level denial prevents direct URL access.
Protect PDFs, documents, and media in WordPress
Each format streams through a secure, authenticated PHP endpoint. No direct download links, no exposed URLs. The file never leaves your server.
Documents & PDFs
Protect PDF files, Word documents, Excel spreadsheets, and PowerPoint presentations. PDFs render in a hardened PDF.js viewer with toolbar removal, print interception, and page-by-page streaming. Office formats are served through an authenticated endpoint.
PDF viewer includes: toolbar removal, download button disabled, print intercepted, right-click blocked, CSS + dynamic watermarks, page-by-page streaming via NGINX X-Accel or PHP readfile.
eBooks
Protect EPUB ebooks in WordPress with an in-browser reader that prevents downloading, printing, and copy-paste. Readers flip through pages in a reflowable viewer — the book file stays on your server. Great for authors, publishers, and course creators selling digital books.
Video
Protect video files in WordPress without relying on Vimeo or Wistia. MP4, WEBM, and OGG videos stream through an authenticated PHP endpoint. The video URL is never exposed in the page source. Combined with role or purchase gating, only authorized viewers can watch.
Audio
Protect audio files from downloading and hotlinking. Podcast episodes, audiobook chapters, music tracks, and sound design packs stream through a secure player. The raw file URL is never visible. Watermark each stream with the listener's identity.
Images & graphics
Protect high-resolution images, design files, and photography from right-click saving and direct URL access. Useful for stock photography sites, design asset libraries, and client proof galleries running on WordPress.
Four layers between your files and unauthorized access
Server-level file denial
Protected files live in a directory blocked by .htaccess or NGINX rules. No direct URL access — even if someone guesses the path. The file is never served as a download.
Authenticated streaming
Files stream through an authenticated PHP endpoint that checks the user's role, group, or WooCommerce purchase history before serving a single byte. NGINX X-Accel-Redirect available for high-performance setups.
Hardened in-browser viewer
PDFs render in a stripped-down PDF.js viewer. Video and audio play through secure HTML5 players. Print, download, right-click, Ctrl+S, and drag-to-desktop are all intercepted.
Watermarks & access logs
CSS and dynamic watermarks overlay the viewer with the reader's email, name, or IP. Every file view is logged — who viewed what, when, and from where. If content leaks, the watermark traces it.
Works with the WordPress plugins you already use
File protection FAQ
01 How do I protect media, PDFs, and documents in WordPress?
Upload the file through Media Guard, gate it by role, group, or WooCommerce purchase, and stream it through the hardened viewer instead of a public media URL. That protects PDFs, protects documents in WordPress, blocks PDF downloads, and keeps the file on your server instead of the visitor's hard drive.
02 Can users still screenshot protected files?
Browser-level screenshot blocking is not possible on the open web — any tool that claims otherwise is misleading. Media Guard focuses on what's enforceable: blocking downloads, prints, and saves, plus adding watermarks that identify the person if screenshots get shared. The combination of inconvenience and traceability is the strongest protection available in a browser.
03 Does it work with files already in my WordPress media library?
Protected files go into a separate, server-denied directory managed by Media Guard — not the standard WordPress media library. You upload files through the Media Guard file manager. This ensures no public URL ever exists for the file.
04 How is this different from password-protecting a WordPress page?
Password-protecting a page hides the page content, but any file links on that page are still direct, shareable URLs. Media Guard protects the files themselves at the server level. Even if someone gets the file URL, the server denies access unless they're authenticated and authorized.
05 What WordPress versions are supported?
Media Guard requires WordPress 6.0 or newer and PHP 7.4+. It's tested against the latest WordPress releases and works with both classic and block themes.
06 Is there a file size limit?
No hard limit in the plugin. The practical limit depends on your server's PHP upload_max_filesize and post_max_size settings. The free tier caps individual files at 10 MB; Pro and Agency have no plugin-side limit.
Start protecting your WordPress media files today
Install the free version and protect your first two files in under five minutes. Upgrade to Pro when you need unlimited files, watermarks, and access logs.