Architecture

Directory layout

The private tree mirrors the public uploads layout. The main site’s private files sit at the root of the private directory (private-uploads/2026/10/file.pdf); every other site’s sit under sites/ID/ (private-uploads/sites/60/2026/10/file.pdf), exactly as its public uploads sit under uploads/sites/ID/. Proxy URLs carry the same path below /protected-files/.

Releases before 1.5.0 put every site’s private files at the root, alongside the main site’s. On a subsite, a file still there is a legacy flat file (LH_Private_Uploads_Paths::is_legacy_flat_path()). It stays readable through the proxy only while that site’s own postmeta holds its exact path, can still be moved back to public, and once moved into its site’s directory, a request for its old flat URL is redirected (301) to the new one.

Classes

Filters

Constants