=== IntentDeep Virtual Files - AI-Ready: Robots.txt, Security.txt, Ads.txt, LLMS.txt ===
Contributors: the-rock, freemius
Tags: robots.txt, seo, llms.txt, ai content generator, chatgpt
Requires at least: 5.0
Requires PHP: 7.4
Tested up to: 6.9
Stable tag: 1.0.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Create robots.txt, ads.txt, security.txt, llms.txt & JSON files with AI-ready content generation (ChatGPT, Claude, Gemini) at any path. No FTP needed.

== Description ==

Virtual Files lets you create and manage robots.txt, ads.txt, app-ads.txt, security.txt, llms.txt, RSS feeds, and JSON files directly from your WordPress dashboard. These files can be created at any path depth (yoursite.com/robots.txt, yoursite.com/.well-known/security.txt, yoursite.com/llms.txt, yoursite.com/api/data.json) and behave just like physical files, but are stored in your database—no FTP access required.

**🤖 AI-Ready Content Generation**
Connect your own AI models to generate, improve, and analyze virtual file content. Use **ChatGPT**, **Claude**, **Gemini**, **Grok**, **Qwen**, **GLM**, and 30+ other AI models. Simply add your API key and create perfect robots.txt, proper ads.txt files, compliant security.txt, AI-friendly llms.txt, and more—all with AI assistance. Attach posts, pages, or products as context for more relevant generation.

= The Problem =

Managing robots.txt, ads.txt, app-ads.txt, security.txt, llms.txt, .well-known files, and other server files traditionally requires FTP access, correct file permissions, and manual directory creation. For managed hosting or multiple sites, this becomes a maintenance nightmare.

= The Solution =

Virtual Files eliminates these hassles by storing everything in your WordPress database while serving content as if files physically exist at any path on your server. No FTP, no server access, no directory creation, no permission headaches.

With **AI-ready integration**, you can now connect your favorite AI models to:
- **Generate** new files from natural language descriptions
- **Improve** existing content with AI suggestions
- **Analyze** files for errors, security risks, and optimization opportunities

= 🔥 Top Use Cases =

**SEO & AI Optimization**
- Create and edit your robots.txt instantly to control crawler access
- Generate llms.txt to guide AI crawlers (ChatGPT, Claude, Perplexity)
- Test different configurations without file uploads
- Control how AI tools index and cite your content

**Monetization & Security**
- Add your ads.txt or app-ads.txt for Google AdSense compliance
- Publish a security.txt file to define your security policy (RFC 9116 standard)
- Approve inventory and boost revenue with proper ads.txt management

**Developers & API**
- Host .well-known/security.txt, .well-known/apple-app-site-association
- Create nested API endpoints (api/v1/data.json, api/config.json)
- Serve static configuration files at any path for headless WordPress setups
- No need to create physical directories - paths are virtual

**Managed Hosting**
- Perfect for WP Engine, Kinsta, Flywheel where FTP is limited
- No need to contact support for simple file changes
- Complete control from WordPress dashboard

= Security & Performance =

**Enterprise-Grade Security:**
- All content sanitized to prevent XSS attacks
- PHP code execution protection
- Nonce verification on all operations
- Role-based permission checks
- Database-backed redundancy (included in WordPress backups)

**Zero File Permission Issues:**
No chmod, no chown, no permission denied errors. Everything managed through WordPress capabilities.

**Performance Optimized:**
- Smart caching (Pro) for up to 10x faster delivery
- Minimal database queries
- Automatic cache invalidation on updates
- No file system overhead

= 🤖 AI-Powered Features =

**Connect 30+ AI Models**
- **ChatGPT** (GPT-5.2, GPT-5 Mini, GPT-4o)
- **Claude** (Claude Opus 4.6, Claude Sonnet 4.6, Claude Haiku 4.6)
- **Gemini** (Gemini 3.1 Pro Preview, Gemini 3 Flash Preview, Gemini 2.5 Flash)
- **DeepSeek** (DeepSeek-V3, DeepSeek-R1)
- **Grok**, **Qwen**, **GLM**, **Kimi**, and **30+ more**
- Connect via OpenAI, OpenRouter, Anthropic, or Google APIs - add your keys and pay providers directly
- Switch between models anytime
- No markup on AI costs

**AI Content Generation**
- **Generate**: Create new files from natural language prompts
- **Improve**: Enhance existing content with AI suggestions and fixes
- **Analyze**: Get detailed explanations of your code, identify errors, and receive optimization suggestions
- **Context-Aware**: Attach up to 3 posts, pages, or products as context for more relevant generation
- **Streaming Responses**: Watch AI generate content in real-time
- **Quick Prompts**: Pre-built templates for common files (robots.txt, ads.txt, security.txt, llms.txt, JSON-LD)
- **History**: All AI generations saved automatically with one-click restore

**AI Use Cases**
- Generate proper robots.txt with custom rules and directives
- Build valid ads.txt or app-ads.txt files for AdSense compliance
- Generate security.txt following RFC 9116 standard
- Create llms.txt for AI crawler instructions (latest AI SEO trend)
- Build .well-known/* files for standards compliance
- Create app-ads.txt files for mobile app monetization
- Build JSON-LD schema markup for SEO
- Generate RSS feeds and custom XML configurations
- Fix syntax errors in existing code
- Analyze code for security vulnerabilities
- Get AI suggestions for content optimization

= Free Version Features =

✅ **Basic File Types**
Create virtual files with these extensions:
- **TXT** – Plain text files (robots.txt, ads.txt, security.txt, llms.txt)
- **MD** – Markdown documents
- **JSON** – API endpoints and data files

✅ **Smart File Management**
- Intuitive admin interface for creating and editing files
- Filter by extension for easy file organization
- File status control (Active/Inactive)
- Support for any path depth (root, subdirectories, .well-known)
- Real-time file preview
- Automatic MIME type detection
- Clean URLs (yoursite.com/path/to/file.txt)

✅ **SEO-Ready**
- Perfect for robots.txt management
- Custom ads.txt and app-ads.txt support
- .well-known directory support (security.txt, etc.)
- Direct URL access for search engines
- No redirect or rewrite delays

✅ **Developer-Friendly**
- Simple text editor for quick edits
- Character encoding support (UTF-8)
- Direct content serving (no overhead)
- WordPress REST API compatible

✅ **Performance Optimized**
- Lightweight database storage
- Minimal server resources
- Fast content delivery
- No file permission issues

✅ **Free Version Limits**
- Up to **5 active files** (inactive files don't count)
- Upgrade to Pro for unlimited files

= Pro Version – Unlock Advanced Features =

🤖 **AI-Ready Content Generation**
- Connect 30+ AI models: ChatGPT, Claude, Gemini, Grok, Qwen, GLM, and more
- Generate, improve, and analyze content with AI
- Attach posts, pages, or products as context
- Real-time streaming responses
- Quick prompt templates for common files
- AI generation history with restore functionality
- **BYOK**: Bring Your Own API Key - you pay providers directly, no markup

🚀 **Premium File Types**
Expand beyond basics with:
- **XML** – RSS feeds, custom XML files, and structured data
- **CSV** – Data exports and imports
- **YAML** – Configuration files (.yml and .yaml both supported)
- **RSS** – Custom RSS feeds
- **LOG** – Log file serving

💻 **Advanced Code Editor**
- **Syntax highlighting** for all file types
- **Line numbers** for easy navigation
- **Multiple themes** (light/dark modes)
- **Auto-close brackets** and smart indentation
- **Line wrapping** for better readability
- **Comment toggle** with keyboard shortcuts

⚡ **Performance Caching**
- **Smart file caching** with configurable TTL
- **Cache warm-up** for all active files
- **Automatic cache invalidation** on updates
- **Cache statistics** dashboard
- Up to **10x faster** file delivery

📊 **Analytics & Insights**
- **Access tracking** for each file
- **View counts** and statistics
- **Last accessed** timestamps
- **File size** monitoring
- Performance metrics

📦 **Import/Export**
- **Backup all files** as JSON
- **Bulk import** from backup files
- **Duplicate detection** prevents conflicts
- **Migration-ready** for site transfers
- **Version control** friendly

🔄 **Unlimited Files**
- No file limits (Free version: 5 active files max)
- Create unlimited virtual files

🎨 **Enhanced UI/UX**
- Modern, clean interface
- File status indicators
- Quick copy URL buttons
- One-click file activation
- Accessibility ready

= Free vs Pro Comparison =

**Free Version Includes:**
✅ TXT, MD, JSON file types
✅ Up to 5 active virtual files
✅ Simple text editor
✅ Any path depth support (.well-known, subdirectories)
✅ Active/Inactive status control
✅ Database-driven file storage

**Pro Version Adds:**
🤖 AI-ready content generation (Generate, Improve, Analyze)
🤖 Connect 30+ AI models: ChatGPT, Claude, Gemini, Grok, Qwen, GLM, and more
🤖 Bring Your Own API Key - full control, no markup on costs
🤖 Context-aware generation with post/page attachment
🤖 Real-time streaming AI responses
🚀 Unlimited virtual files (no 5-file limit)
🚀 Premium file types: XML, CSV, YAML (.yml/.yaml), RSS, LOG
🚀 Advanced code editor with syntax highlighting
🚀 Smart file caching (up to 10x faster delivery)
🚀 Analytics dashboard with access tracking
🚀 Import/Export functionality for backups
🚀 Priority email support

[Upgrade to Pro](https://virtualfiles.intentdeep.com/pricing/) | [7-Day Trial Available](https://virtualfiles.intentdeep.com/pricing/)

= What Makes Virtual Files Different? =

**No File System Access Required**
Manage everything from your WordPress dashboard. No FTP, no server access, no permission headaches.

**Virtual Directories - No Physical Folders**
Create files at any path (.well-known/security.txt, api/data.json) without creating physical directories. Paths are virtual and work instantly.

**Database-Driven Reliability**
Your files are backed up with your database. No lost files due to server issues or migrations.

**Version Control Friendly**
Files live in database, not Git repos. Keep your repository clean and focused on code.

**Instant Updates**
Change content and it's live immediately. No file uploads, no caching delays (with proper cache invalidation).

= Try Pro Risk-Free =

**7-Day Trial**. Experience advanced features before committing.

[Upgrade to Pro](https://virtualfiles.intentdeep.com/pricing/) | [Documentation](https://virtualfiles.intentdeep.com/) | [Support](https://virtualfiles.intentdeep.com/support/)

== Installation ==

= Quick Start =

1. Install and activate the plugin
2. Go to **Virtual Files → Add New**
3. Create your file (e.g., robots.txt)
4. Set status to **Active**
5. Visit `yoursite.com/filename.txt`

That's it! Your virtual file is live.

= Automatic Installation =

1. Log in to your WordPress admin panel
2. Navigate to **Plugins → Add New**
3. Search for "Virtual Files"
4. Click **Install Now** and then **Activate**

= Manual Installation =

1. Download the plugin ZIP file
2. Navigate to **Plugins → Add New → Upload Plugin**
3. Choose the downloaded file and click **Install Now**
4. Click **Activate Plugin**

= Getting Started =

1. Go to **Virtual Files → Add New** in your admin menu
2. Enter a filename with optional path:
   - Simple: "robots" for robots.txt
   - With path: ".well-known/security" for .well-known/security.txt
   - Nested: "api/v1/data" for api/v1/data.json
3. Select file extension (.txt, .md, .json)
4. Add your content
5. Set status to **Active**
6. Click **Publish**
7. Access your file at the specified path (yoursite.com/path/to/file.ext)

== Troubleshooting ==

= Virtual file returns 404 =

1. Go to Settings → Permalinks and click "Save Changes" to flush rewrite rules
2. Verify file status is set to "Active" in Virtual Files dashboard
3. Check that no physical file exists with the same name
4. Ensure permalinks are enabled (required for virtual routing)

= Changes don't appear immediately =

1. Clear site cache (if using WP Rocket, W3 Total Cache, etc.)
2. Clear browser cache (Ctrl+F5 or Cmd+Shift+R)
3. Pro users: Check cache TTL settings in Virtual Files → Settings
4. Verify file is set to "Active" status

= Conflicts with existing physical files =

Virtual files take precedence over physical files with the same name. To serve physical files instead:
- Set virtual file status to "Inactive", OR
- Delete the virtual file from the dashboard

== Frequently Asked Questions ==

= Do virtual files work exactly like physical files? =

Yes! Virtual files are served with proper HTTP headers, correct MIME types, and appear at any URL path just like physical files. Search engines, browsers, and tools can't tell the difference between virtual and physical files.

= Will this conflict with existing physical files? =

Virtual files take precedence over physical files with the same name. If you already have a robots.txt, the virtual version will be served instead. You can disable virtual routing in settings if needed.

= How many files can I create? =

**Free version:** Up to 5 active files
**Pro version:** Unlimited files

Inactive files don't count toward the limit.

= What file types are supported? =

**Free:** TXT, MD, JSON
**Pro:** All free types plus XML, CSV, YAML (.yml and .yaml), RSS, LOG

= Is this good for SEO? =

Absolutely! Virtual Files is perfect for:
- Managing robots.txt manually with instant updates
- Creating llms.txt to guide AI crawlers (emerging AI SEO standard)
- Creating ads.txt and app-ads.txt for monetization
- Creating security.txt for responsible disclosure (RFC 9116)
- Managing .well-known/* files for standards compliance
- Creating custom RSS feeds and JSON-LD schema

= Does caching work with virtual files? =

Yes! The Pro version includes smart caching:
- Configurable cache expiration (5 min to 24 hours)
- Automatic invalidation on updates
- Cache warming for all active files
- Statistics dashboard

= Can I backup my virtual files? =

Pro users can export all files as JSON for backup or migration. Import feature supports bulk restore.

= What happens if I deactivate the plugin? =

Virtual files will no longer be accessible. Physical files (if they exist) will take over. Your virtual file data remains in the database and will work again when you reactivate.

= Is the plugin translation ready? =

Yes! Virtual Files is fully internationalized and ready for translation into any language.

= Do you offer support? =

Free version: Community support via WordPress.org forums
Pro version: Priority email support with faster response times

= Can I create files in subdirectories or custom paths? =

Yes! Virtual Files supports any path depth. You can create:
- Root files: robots.txt, ads.txt
- Subdirectory files: api/data.json, cdn/config.txt
- .well-known directory: .well-known/security.txt, .well-known/apple-app-site-association
- Deep nested paths: path/to/any/file.json

No need to create physical directories—paths are virtual and created automatically.

= What is security.txt and why should I use it? =

Security.txt (RFC 9116) is a standard for websites to define security policies and contact information for security researchers. It helps ethical hackers report vulnerabilities responsibly. Virtual Files makes it easy to create and maintain this file at /.well-known/security.txt (recommended) or /security.txt without creating physical directories.

= Does this work with caching plugins? =

Yes! Virtual files work with WP Rocket, W3 Total Cache, WP Super Cache, and other popular caching plugins. Clear your cache after making changes to virtual files for updates to appear immediately.

= Can I use this on WordPress Multisite? =

Yes! Virtual Files is fully compatible with WordPress Multisite installations. Each subsite can manage its own virtual files independently.

= Does this work with WP Engine, Kinsta, or other managed hosts? =

Absolutely. Virtual Files is perfect for managed hosting where FTP access is limited or restricted. No server access needed—manage everything from your WordPress dashboard.

= Will this affect my site speed? =

No negative impact. Virtual files are lightweight and have minimal performance impact. The Pro version's smart caching actually makes file delivery up to 10x faster than physical files.

= Can I migrate virtual files between sites? =

Yes! Pro users can export all files as JSON and import them on another WordPress installation. Perfect for staging-to-production workflows or managing multiple sites.

= How does AI content generation work? =

Virtual Files is AI-ready - it connects to your favorite AI models to help you generate, improve, and analyze file content. Simply add your API key in settings, describe what you need in natural language, and the AI creates the content for you. You can attach posts, pages, or products as context to get more relevant generation.

= Which AI models are supported? =

Pro version supports 30+ AI models:
- **ChatGPT**: GPT-5.2, GPT-5 Mini, GPT-4o
- **Claude**: Claude Opus 4.6, Claude Sonnet 4.6, Claude Haiku 4.6
- **Gemini**: Gemini 3.1 Pro Preview, Gemini 3 Flash Preview, Gemini 2.5 Flash
- **DeepSeek**: DeepSeek-V3, DeepSeek-R1
- **Grok**: Grok 4 Fast, Grok 3 Mini
- **Qwen**: Qwen3 32B, Qwen3 14B
- **GLM**: GLM-4.7, GLM-4.6, GLM-4.5
- **Kimi**: Kimi K2, Kimi K2 Thinking
- And 20+ more models

You can add your API keys in Virtual Files → Settings and switch between models anytime. Most providers offer free tiers to get started.

= Is my data sent to AI providers? =

Yes, when you use AI features, your prompts and any attached context are sent to the AI provider you've configured. The AI provider's privacy policy applies. Virtual Files does not store or analyze your data beyond what's necessary for generation.

= Can I use AI without an API key? =

AI features require an API key from your chosen AI model provider. Virtual Files is AI-ready but does not provide free AI access - you use your own API keys. This means you have full control over costs and data privacy. Most providers offer free tiers to get started (e.g., ChatGPT gives $5 credit, Gemini offers generous free quota).

= What's the difference between Generate, Improve, and Analyze? =

- **Generate**: Creates new file content from scratch based on your description
- **Improve**: Takes existing content and enhances it based on your instructions (fix errors, optimize, add features)
- **Analyze**: Provides a detailed explanation of what your code does, identifies potential errors, security risks, and suggests improvements

= Does AI generation work with all file types? =

Yes! AI can generate content for all supported file types (TXT, MD, JSON, XML, CSV, YAML, RSS, LOG). The AI automatically adapts output format based on the file extension you select.

= Can I undo AI-generated content? =

Yes! All AI generations are saved in the AI History sidebar. You can click any previous generation to view and restore it. You can also use WordPress revisions to restore previous versions of your virtual file.

= Is my content safe with AI generation? =

Your content is processed through the AI provider you choose, which may have data retention policies. We recommend reviewing your AI provider's privacy policy. Virtual Files does not store AI-generated prompts or responses beyond the local history for your convenience.

= Can I attach multiple posts/pages as context? =

Yes, you can attach up to 3 posts, pages, or products as context for AI generation. This helps the AI understand your site's structure and generate more relevant, tailored content.

= What is llms.txt and why should I use it? =

llms.txt is an emerging standard file that guides AI crawlers (ChatGPT, Claude, Perplexity, SearchGPT) on how to index and cite your content. It's like robots.txt but for AI tools. By creating an llms.txt file, you can:
- Control how AI tools use your content
- Specify which pages should be cited
- Provide context about your site's purpose
- Guide AI assistants to give accurate information about your brand

This is the cutting edge of AI SEO and helps ensure AI tools represent your content correctly. Virtual Files makes it easy to create and manage llms.txt with AI assistance.

== Screenshots ==

1. Add/Edit virtual file interface with filename input and extension dropdown
2. Text editor interface for creating file content
3. AI generation modal with prompt input and context attachment
4. AI streaming response in real-time with action buttons
5. AI generation history sidebar with restore functionality
6. Pro: Advanced code editor with syntax highlighting and line numbers
7. The Settings page with AI provider configuration and API keys
8. Pro: Analytics dashboard showing file access statistics and metrics
9. Pro: Cache management page with TTL configuration
10. File status check tool testing accessibility and HTTP headers
11. Pro: Import/Export interface for backup and migration
12. The main virtual files dashboard showing all created files with status indicators

== Changelog ==

= 1.0.1 =
* 🤖 **Major Update: AI-Ready Integration**
* ✅ AI Content Generation: Generate, improve, and analyze virtual file content with AI
* ✅ Multiple AI Providers: Support for 30+ models including ChatGPT (5.2, 4o), Claude (4.6), Gemini (3.1), and DeepSeek
* ✅ Context-Aware Generation: Attach posts, pages, or products as context
* ✅ Real-Time Streaming: Watch AI generate content live
* ✅ Quick Prompts: Pre-built templates for common files (robots.txt, ads.txt, security.txt, llms.txt)
* ✅ AI History: All generations saved with one-click restore
* ✅ Improved Error Handling: Better UX for missing API keys and errors
* 🎨 UI Improvements: New Generate, Improve, and Analyze buttons
* 🎨 AI History Sidebar: View and restore previous AI generations
* 🎨 Context Search: Search and attach content for better AI results
* 🔒 Security: Enhanced nonce verification and permission checks

= 1.0.0 - 2025-01-15 =
* 🎉 Initial WordPress.org release
* ✅ Free: TXT, MD, JSON file support
* ✅ Free: Up to 5 active virtual files
* ✅ Free: Simple text editor with UTF-8 support
* ✅ Free: robots.txt, ads.txt, security.txt, llms.txt management
* ✅ Free: Support for any path depth (root, subdirectories, .well-known)
* ✅ Free: Active/Inactive status control
* ✅ Free: Clean URL serving at any path
* 🚀 Pro: Advanced file types (XML, CSV, YAML with .yml/.yaml, RSS, LOG)
* 🚀 Pro: Syntax-highlighted code editor with multiple themes
* 🚀 Pro: Smart caching system (up to 10x faster delivery)
* 🚀 Pro: Analytics & access tracking dashboard
* 🚀 Pro: Import/Export functionality for backups
* 🚀 Pro: Unlimited virtual files (no 5-file limit)
* 🔒 Security: XSS prevention, PHP injection protection
* 🌍 Translation ready with full i18n support
* ⚡ Performance: Lightweight, minimal database queries
* 🎨 Modern, accessible admin interface

== Upgrade Notice ==

= 1.0.1 =
🤖 **AI Integration is here!** Virtual Files is now AI-ready - connect your own ChatGPT, Claude, Gemini, Grok, DeepSeek, Qwen, or GLM API keys to generate, improve, and analyze virtual files. Attach posts and pages as context, view generation history, and get real-time streaming responses.

**New Features:**
- AI-ready content generation (Generate, Improve, Analyze modes)
- Connect 30+ AI models including the latest from OpenAI, Anthropic, Google, and DeepSeek
- Bring Your Own API Key - full control, no markup on costs
- Context-aware generation with post/page attachment
- AI generation history with one-click restore
- Real-time streaming responses
- Quick prompt templates for common files

**Note on AI features:** Available to both Free and Pro users. Add your API key in Virtual Files → Settings. Most providers offer free tiers to get started.

= 1.0.0 =
🎉 Initial release! Create robots.txt, ads.txt, app-ads.txt, security.txt, llms.txt, JSON APIs, and RSS feeds at any path depth without physical files or directories. Free version supports TXT, MD, and JSON files with up to 5 active files.

**Upgrade to Pro for:**
- Unlimited virtual files
- XML, CSV, YAML (.yml and .yaml), RSS, and LOG support
- Advanced code editor with syntax highlighting
- File caching for 10x faster delivery
- Analytics dashboard and access tracking
- Import/Export for easy backup and migration

== Privacy Policy ==

Virtual Files does not collect, store, or transmit any personal data. All file content is stored locally in your WordPress database.

**AI Features:** When using AI-powered features (Generate, Improve, Analyze), your prompts and any attached context are sent to the AI provider you've configured in settings. Virtual Files does not store or analyze this data beyond what's necessary for the generation. Each AI provider has its own privacy policy and data handling practices that you should review.

The Pro version may connect to our licensing server only for license validation.

== Support ==

Need help? Have suggestions?

- **Free Support:** [WordPress.org Forums](https://wordpress.org/support/plugin/intentdeep-virtual-files/)
- **Pro Support:** [Priority Support](https://virtualfiles.intentdeep.com/support/)
- **Documentation:** [Knowledge Base](https://virtualfiles.intentdeep.com/)
- **Feature Requests:** [Contact](https://virtualfiles.intentdeep.com/support/contact.html)