Appearance
Introduction to Virtual Files
Virtual Files is a powerful WordPress plugin that allows you to create and manage files that behave as if they physically exist in your website root directory. This innovative approach enables you to serve dynamic content through static file URLs without cluttering your filesystem.
What are Virtual Files?
Virtual files are WordPress posts that are served as actual files through clean URLs. Instead of creating physical files on your server, Virtual Files intercepts requests and serves content dynamically while maintaining proper file headers and MIME types.
Key Benefits
🚀 Clean URLs
Serve files through clean, SEO-friendly URLs like:
yourdomain.com/robots.txtyourdomain.com/sitemap.xmlyourdomain.com/api/config.json
📁 Dynamic Content
Create files that can be updated through the WordPress admin without FTP or file system access. Perfect for:
- Dynamic sitemaps
- API endpoints
- Configuration files
- Redirect rules
⚡ Performance Optimized
Built-in caching system ensures lightning-fast file serving with minimal database overhead.
🔒 Secure by Design
Multi-layer security with content sanitization, access control, and WordPress security best practices.
Use Cases
SEO & Search Engines
- robots.txt: Dynamic robots files that can include custom rules
- sitemap.xml: Auto-generated sitemaps with your latest content
- sitemap_index.xml: Multiple sitemap management
API Development
- JSON endpoints: RESTful API responses through clean URLs
- Configuration files: Dynamic config files for applications
- Integration Ready: REST API endpoints for external integrations
Content Management
- Documentation: Serve markdown files as HTML
- Download files: Generate and serve CSV/JSON exports
- Verification files: Domain ownership and service verification
Development & Testing
- Mock endpoints: Create test endpoints for development
- Staging configs: Environment-specific configuration files
- Debug files: Temporary debugging information
How It Works
- File Creation: Create virtual files through WordPress admin
- URL Registration: Plugin registers rewrite rules for clean URLs
- Request Interception: WordPress intercepts requests to virtual file URLs
- Content Serving: Plugin serves content with proper headers and caching
- Performance: Built-in caching reduces database queries
Architecture Overview
Virtual Files uses modern WordPress development practices:
- PSR-4 Autoloading: Clean, organized code structure
- MVC Pattern: Separation of concerns with controllers and traits
- WordPress Hooks: Proper integration with WordPress lifecycle
- Security Layers: Multiple validation and sanitization points
- Caching System: Transient-based caching with TTL support
Free vs Pro
| Feature | Free | Pro |
|---|---|---|
| Basic File Types (TXT, MD, JSON) | ✅ | ✅ |
| Active Files Limit | 5 | Unlimited |
| Basic Text Editor | ✅ | ✅ |
| Clean URL Serving | ✅ | ✅ |
| Advanced File Types (XML, RSS, CSV, YAML, LOG) | ❌ | ✅ |
| CodeMirror Editor with Syntax Highlighting | ❌ | ✅ |
| Performance Caching | ❌ | ✅ |
| Analytics & Access Tracking | ❌ | ✅ |
| Import/Export Functionality | ❌ | ✅ |
| Advanced UI Features | ❌ | ✅ |
Getting Started
Ready to dive in? Check out our Installation Guide to get Virtual Files up and running on your WordPress site.
For a quick overview of creating your first virtual file, see our Quick Start Guide.