Protect uploaded previews
WordPress puts Media Library audio at a public path under /uploads. Anyone who copies that URL can keep it. Protect uploaded previews swaps that path for a short-lived BeatStore link. Listeners still hit Play. The file is not sitting at a bookmarkable address.
Off by default. SoundCloud and Dropbox previews are unchanged.
Turn it on
- BeatStore → Settings.
- Enable Protect uploaded previews.
- Optional: leave Block known AI crawlers on, and set Preview link lifetime (default 60 minutes).
- Save.
Then Settings → Permalinks → Post name, Save, if /beatstore-preview/ 404s. Install and plugin updates usually flush that rewrite.
Reload the player page so it fetches a fresh catalog. Old /uploads preview URLs in a cached page keep working until you stop serving those files.
What the player gets
The catalog and the player receive /beatstore-preview/?token=…&sig=… instead of https://yoursite.com/wp-content/uploads/…/beat.mp3.
The token carries the beat id and an expiry. The signature is checked on each request. After the lifetime you set, that URL stops working. A new catalog load mints a new one.
Known training crawlers (GPTBot, ClaudeBot, Bytespider, and similar) can be refused on the preview stream and on play counting. Filter beatstore_ai_crawler_patterns if you need to add a user-agent. See PHP Hooks.
What it does not do
A still-valid link can be saved. This is not a save lock and not DRM. The Media Library file still lives in /uploads. Protection stops the player and catalog from publishing that path. It does not lock the file on disk.
If you do not want the clean mix in the player, upload a tagged, lower-quality MP3 as the preview and keep the full file in EDD or Woo download files.
PHP serves these bytes instead of the web server handing out a static file. That is why the setting starts off.
Requirements
- Audio preview source is Upload (Media Library).
- Pretty permalinks help.
?beatstore_preview=1still works if permalinks are plain.
Troubleshooting
| Symptom | What to check |
|---|---|
/beatstore-preview/ 404s | Setting is on, then resave permalinks |
| “This preview link is invalid or has expired” | Reload the player so the catalog issues a new URL. Default lifetime is 60 minutes |
| “Too many preview requests” | Per-IP rate limit on the stream. Wait and try again |
| SoundCloud or Dropbox still shows a third-party URL | Expected. Protection is Media Library only |
See also Troubleshooting.
Related: Add New Music / Beats · Getting Started / Setup