A WordPress plugin that protects file downloads behind a password or lead capture form, helping you generate leads while controlling access to your valuable content. Perfect for creating lead magnets with PDFs, documents, videos, archives, and more.
NEW in v1.0.6: Enterprise-grade IP whitelisting system with robust proxy/firewall compatibility!
Features
🔐 File Protection
- Gate any file type behind a password or lead capture form
- Configurable file extensions (PDF, DOC, DOCX, ZIP, MP4, and more)
- Flexible protection rules - protect by filename, partial path, or full URL
- Universal file interception regardless of directory structure
- Works with WordPress in subdirectories and multisite installations
- Beautiful, responsive lead capture form
- Collects name, email, and optional phone number
- Automatic email delivery with access passwords
- Lead management system with complete contact information
- Email spam prevention with 30-minute cooldown between requests
- Side-by-side form layout on desktop, stacked on mobile
- Clean, professional design that matches your WordPress theme
- Helpful placeholders and user-friendly interface
- Customizable email templates
- Enterprise IP Whitelisting - Bypass lead capture for trusted IP addresses
- Multiple IP Formats - Support for single IPs, CIDR notation, and IP ranges
- Proxy/Firewall Compatible - Smart IP detection behind CDNs, load balancers, and firewalls
- Real Client IP Detection - Supports X-Forwarded-For, CF-Connecting-IP, and all major proxy headers
- Perfect for Organizations - Seamless access for internal networks while maintaining lead generation
- Secure password generation using WordPress salts
- Cookie-based authentication for seamless access
- No database bloat - passwords generated on-demand
- Proper file serving with security headers
- Comprehensive Logging - All IP detection and access attempts logged
📝 Lead Generation
🎨 Modern Interface
🌐 IP Whitelisting & Access Control (NEW in v1.0.6)
🛡️ Security & Performance
Installation
1. Upload the Plugin
- Upload the lead-magnet-download-wall folder to /wp-content/plugins/
- Or install via WordPress admin: Plugins → Add New → Upload Plugin
2. Activate the Plugin - Go to Plugins in your WordPress admin - Find "Lead Magnet Download Wall" and click "Activate"
3. Configure Settings - Navigate to Lead Magnet in your WordPress admin menu - Configure your protected files and email settings
Configuration
Protected Files
Add URLs or filenames of files you want to protect:<h1>Examples of protection rules:</h1>
document.pdf # Protects any file named "document.pdf"
reports/ # Protects any file in "reports" directories
wp-content/uploads/secret.pdf # Protects specific file
my-ebook.docx # Protects Word documents
video-course.mp4 # Protects video filesEmail Settings
Customize the email sent to users with their access password:{name}, {password}, {site_name}IP Whitelisting Configuration (NEW in v1.0.6)
Configure trusted IP addresses that can bypass lead capture entirely:<h1>Examples of IP whitelist formats:</h1>\n192.168.1.100 # Single IP address\n192.168.1.0/24 # CIDR notation (entire subnet)\n10.0.0.1-10.0.0.50 # IP range (from-to format)\n203.0.113.195 # External office IP\n172.16.0.0/16 # Large internal networkPerfect for:
Form Customization
The plugin automatically creates a responsive form with:Usage
For Site Administrators
1. Add Protected Files - Go to Lead Magnet → Settings - Configure file extensions (PDF, DOC, ZIP, MP4, etc.) - Add file patterns to the "Protected File URLs/Patterns" textarea - Save settings
2. Manage Leads - View all leads at Lead Magnet → Leads - NEW: Edit any lead - Click on any lead to edit all information - Edit fields: Name, email, phone, IP address, creation date - See complete contact information including generated passwords - Export or manage lead data as needed
3. Customer Support - Access any lead's information from the admin area - NEW: Update lead details - Correct typos or update contact information - View or regenerate passwords for users who call for support - Track lead generation and PDF access patterns
4. Lead Data Management - NEW: Manual lead entry - Add leads directly through WordPress admin - Edit existing leads - Update any field with proper validation - Audit trail - All changes automatically logged for compliance
5. IP Whitelisting Management (NEW in v1.0.6) - Go to Lead Magnet → Settings → IP Whitelist - Add trusted IP addresses (one per line) - Support for single IPs, CIDR notation, and IP ranges - Automatic proxy detection - Works behind firewalls, CDNs, and load balancers - Real-time logging - Monitor IP detection and whitelist matches in logs
For Website Visitors
1. Accessing Protected Files - Click on any protected file link - Choose to enter an existing password or request access - Fill out the lead form to receive an access password via email - Spam Protection: If you've already requested access, wait 30 minutes before requesting again
2. Using Access Passwords
- Passwords are in format: 123a1b2c (ID + hash, no spaces or dashes)
- Passwords work for all protected files on the site
- Passwords remain valid for future downloads
Technical Details
System Requirements
How It Works
1. File Interception: Uses .htaccess rules to intercept protected file requests\n2. Protection Check: Compares requested file against protection rules\n3. Authentication: Checks for valid cookie or redirects to form\n4. Lead Processing: Captures lead data and generates unique passwords\n5. Spam Prevention: Enforces 30-minute cooldown between email requests\n6. Email Delivery: Sends access password to user's email\n7. Secure Access: Sets authentication cookie for future file access
File Structure
lead-magnet-download-wall/
├── lead-magnet-download-wall.php # Main plugin file
├── protected-gate-handler.php # File request handler
├── protected-gate-form.php # Access form
├── serve-file.php # Secure file serving script
├── includes/
│ ├── class-protected-gate-admin.php # Admin interface
│ ├── class-protected-gate-handler.php # Handler class
│ ├── class-protected-gate-logger.php # Logging system
│ └── class-protected-gate-utils.php # Centralized utilities (NEW)
├── assets/
│ └── css/
│ └── protected-gate-styles.css # Styling
└── README.md # This fileCustomization
Styling
Customize the form appearance by editing:assets/css/protected-gate-styles.css for form styling.protected-gate-container, .protected-gate-formEmail Templates
Customize email content in the admin settings using these variables:{name} - User's name{password} - Generated access password{site_name} - Your site name{site_url} - Your site URLHooks and Filters
The plugin provides various WordPress hooks for developers:protected_leadprotected_gate_* optionsprotected_gateTroubleshooting
Files Not Being Intercepted
Emails Not Sending
Form Not Displaying
Password Issues
Support
For support, feature requests, or bug reports:
Changelog
Version 1.0.6
Version 1.0.5
Version 1.0.4
Version 1.0.3
Version 1.0.2
Version 1.0.1
Version 1.0.0
License
This plugin is licensed under the GPL-2.0+ license.
---
Lead Magnet Download Wall - Protect your Files, Generate your Leads


