Compatibility: Caching Plugins, Image Optimizers & Performance
XYZ Protect is designed to work alongside popular WordPress performance plugins. This guide covers known compatibility, configuration tips, and the optional MU-plugin for enhanced compatibility.
Page Caching Plugins
Compatible with content protection (Guard Cookie mode):
- WP Rocket
- LiteSpeed Cache
- W3 Total Cache
- WP Super Cache (Simple mode)
- Jetpack Boost
Guard Cookie mode generates the same protected URLs for all authorized users, so cached pages contain the correct URLs. Page caching works normally for content-protection-only sites.
Not compatible with Age Verification: Full-page caching plugins like WP Rocket serve static HTML files directly from disk before PHP ever executes. This means the MU-plugin age gate redirect never fires on cached pages — visitors from regulated regions would see content without being verified. If you use Age Verification, you must either disable full-page caching or configure your caching plugin to exclude pages that require age verification.
Encrypted URL mode and caching: Encrypted URL mode generates per-user URLs that are unique to each visitor's session. Full-page caching for logged-in users will serve one user's URLs to another user, causing access failures. If you use Encrypted URL mode and page caching, configure your caching plugin to exclude logged-in users from the page cache, or use Tiered mode (Guard Cookie for most users, Encrypted URL for premium users).
Image Optimization Plugins
Compatible:
- EWWW Image Optimizer (including WebP conversion and JS lazy loading)
- ShortPixel
- Imagify
- Smush
- Modern Image Formats
XYZ Protect's output buffer runs after image optimization plugins have completed their transformations. This means WebP/AVIF conversion, lazy loading rewrites, and responsive image modifications all happen first — then XYZ Protect rewrites the final URLs.
MU-Plugin for enhanced compatibility: If you experience issues with image optimization plugins (images not loading or showing original URLs instead of protected URLs), enable the optional MU-plugin from Content Protection > Advanced > MU-Plugin. The MU-plugin ensures XYZ Protect's URL rewriting runs at the correct position in the processing pipeline.
File Manager Plugins
XYZ Protect works with files uploaded through any method:
- WordPress Media Library
- WP File Manager (1M+ installations)
- Advanced File Manager
- Bit File Manager
- FTP / SFTP
- Hosting control panels (cPanel, Plesk)
Files don't need to be registered in the WordPress Media Library to be protected. As long as they're in a protected path, they're covered. This is particularly important for membership sites where files are often uploaded via FTP or file manager plugins rather than the Media Library.
Performance Impact
Guard Cookie mode: Minimal impact. The output buffer performs a simple domain-swap regex on your page HTML. Processing time is typically under 2ms even for pages with dozens of images.
Encrypted URL mode: Low impact. AES-256-GCM encryption is computed for each protected URL in the page. Processing time is typically under 10ms for a page with 50 protected images.
Media delivery: Protected media is served through the XYZ Worker network. For a typical image (100-500KB), delivery time is comparable to serving from your origin server. Large files (videos, high-resolution images) stream through the Worker without buffering — a 6MB image delivers in under 600ms.
The MU-Plugin
The optional MU-plugin (xyz-protect-buffer.php) is installed to wp-content/mu-plugins/ and ensures the URL rewriting output buffer is registered at the outermost position. This is important when other plugins (image optimizers, CDN rewriters, minifiers) also use output buffers. The MU-plugin also handles early age verification redirects before page caching layers.
When to enable:
- Recommended for all sites using Age Verification. The MU-plugin ensures age gate redirects happen before page caching layers can interfere.
- Optional for content-protection-only sites. Enable if you use image optimization plugins with lazy loading or format conversion, or if you notice that some media URLs aren't being rewritten on the page.
How to enable: Go to Content Protection > Advanced > MU-Plugin and toggle it on. The plugin copies the MU-plugin file automatically. If the mu-plugins directory doesn't exist, you may need to create it on your server first.
Clean removal: When you deactivate XYZ Protect, the MU-plugin is automatically removed. You can also toggle it off from the settings at any time.