Skip to content

ITC Media Workspace 0.3.43Changelog

Protected media

Use Media → Protected Files → Upload as protected to upload new files that only chosen roles or accounts can open. Add a Protected Media block to link to the file. The label is public and editable. The block inherits theme styles, and the uncached access page handles sign-in and permissions.

Open Media → Protected Files and select a file. Under Manage access, Who can open this file? offers:

  • Use site settings: the roles chosen for all protected files (see below).
  • Selected roles: only the roles you tick for this file.
  • Specific WordPress users: up to 100 usernames from this site, one per line.

Pause access for everyone closes the file without changing the link; clear it and save to open it again. Check a user’s access tells you whether an account can open the file with the saved settings. When an account is deleted from WordPress, it is removed from every file’s list.

Replace file uploads a new version of the same file type. The link and the access settings stay the same, so pages that link to the file keep working. Delete file removes it permanently after you confirm that you checked where it is used.

Nothing to set up. Files are encrypted with libsodium before they are saved in uploads/itc-protected, and are decrypted only for an approved role. A direct request to the folder, a misconfigured server or a copied backup of the files alone gives unreadable data. PHP’s sodium extension must be on.

The plugin adds blocking rules for Apache, LiteSpeed and IIS. For Nginx, ask your host to add the rule shown under Media → Protected Files → Storage and server rules. Check direct access tells you whether your server blocks requests.

Back up the database and the folder together. The database holds the key (itc_mw_protected_key); without it the files cannot be opened. The plugin does not create a new key while encrypted files exist. To keep the key out of the database, set ITC_MW_PROTECTED_KEY in wp-config.php to a base64-encoded random 32-byte key before the first upload, and back it up separately.

Anyone with both the database and the files can decrypt them. Use a host you trust.

Exclude /protected-media/ and the itc_mw_protected query parameter from page and CDN caches.

Set ITC_MW_PROTECTED_MEDIA_DIR in wp-config.php to an existing, owner-only (0700) folder outside the document root. New files are then stored there without plugin encryption. Files uploaded earlier stay where they are and keep working while their storage is available.

Once private storage is configured, go to Media → Protected Files as an administrator.

  1. Under Roles allowed to view protected media, select the WordPress roles that should have access. The Administrator role is selected by default.
  2. Under Allowed protected file formats, check the formats editors may upload. JPEG, PNG, WebP and PDF are enabled by default. Enable ZIP archive to allow private ZIP downloads. The plugin serves the archive as uploaded, without opening or extracting it. WordPress upload restrictions also apply.
  3. Select Save protected media settings.

Turning off a format only affects future uploads. Existing protected files remain available to users with access. When no formats are available to the current user, the protected upload form is unavailable.

Add itc_mw_protected_media_download_formats to a site plugin or must-use plugin. Use one lowercase extension without the leading dot as each key, and supply a label and MIME type. The filter receives an array of extra formats. Media Workspace adds those formats to its built-in list.

add_filter(
'itc_mw_protected_media_download_formats',
static function ( $formats ) {
$formats['txt'] = array(
'label' => 'Plain text (.txt)',
'mime' => 'text/plain',
);
return $formats;
}
);

The format appears unchecked. Enable it under Allowed protected file formats. The extension and MIME type must also match the uploader’s WordPress policy. If the site has a custom policy, configure it separately with WordPress’s upload_mimes filter and test a representative file.

Extra formats are served as downloads through the same role-checked endpoint. They have no inline preview or generated thumbnail. The format filter applies to new uploads, so removing it leaves earlier downloads available.

Use the standard Gutenberg controls to adjust typography, colors and spacing. Theme styles and patterns can target the .wp-block-itc-media-workspace-protected-media wrapper and its .itc-mw-protected-media__action link. The access page uses .itc-mw-protected-access and .itc-mw-protected-media__preview.

Protected attachments use a dedicated upload flow. Native image editing, thumbnail regeneration and cloud storage jobs are unavailable for those files.

In Media Workspace, select a protected item and open File actions to open or copy its protected link. If permanent deletion reports a storage error, restore access to the private directory and retry deletion from the item.