Skip to content

Backup and Restore

Complete guide to backing up and restoring your virtual files using Virtual Files backup and restore functionality (Pro feature).

Overview

Virtual Files Pro includes backup and restore functionality to help you:

  • Backup your virtual files for safekeeping
  • Migrate between sites without losing data
  • Restore multiple files at once
  • Recover data when needed

Exporting Files (Backup)

Export Format

Virtual Files supports JSON export format:

  • Complete Data: All files with full metadata
  • Human-Readable: Formatted JSON structure
  • Version Information: Export timestamp and site URL
  • Lightweight: Small file size for easy transfer

Export Process

  1. Navigate to Virtual Files → Settings
  2. In the Backup & Restore widget, click Download Backup
  3. The system will export all virtual files as a JSON file
  4. The file will automatically download to your device

Export File Structure

json
{
  "version": "1.0",
  "export_date": "2026-XX-XX XX:XX:XX",
  "site_url": "https://yourdomain.com",
  "files": [
    {
      "id": 1,
      "title": "File Title",
      "slug": "file-slug",
      "status": "publish",
      "filename": "robots.txt",
      "content": "file content here",
      "mime_type": "text/plain",
      "created_at": "2026-XX-XX XX:XX:XX",
      "updated_at": "2026-XX-XX XX:XX:XX"
    }
  ]
}

Restoring Files

Restore Sources

Virtual Files supports JSON restore format:

  • JSON Files: Restore from exported backup files
  • Validation: JSON structure validation
  • Error Handling: Graceful handling of malformed files
  • Duplicate Detection: Skips files that already exist

Restore Process

  1. Navigate to Virtual Files → Settings
  2. In the Backup & Restore widget, click Choose Backup File
  3. Select your JSON backup file (max 10MB)
  4. The system will validate and process the file
  5. View restore results and any error messages

Restore Features

  • File Validation: Ensures proper JSON format
  • Size Limits: Maximum 10MB file size
  • Duplicate Handling: Skips existing files to avoid conflicts
  • Progress Tracking: Shows restore progress with loading states
  • Error Messages: Clear feedback for any issues

Requirements

Pro Feature

  • Backup and restore functionality is a Pro-only feature
  • Free users will see the widget with "PRO" badges
  • Upgrade to Pro to unlock these features

File Requirements

  • Format: JSON only (ZIP restore not yet implemented)
  • Size: Maximum 10MB
  • Content: Must match expected JSON structure

Common Use Cases

Site Migration

Move virtual files from one WordPress site to another:

  1. Export from old site using the Download Backup button
  2. Install Virtual Files Pro on new site
  3. Import the backup file using the restore functionality
  4. Verify all files work correctly

Regular Backup

Keep your virtual files safe:

  1. Export files regularly using the backup feature
  2. Store backup files in a safe location
  3. Test restoration periodically to ensure backups work

Troubleshooting

Common Export Issues

Export Fails

Solutions:

  1. Verify you have Pro license active
  2. Check WordPress admin permissions
  3. Refresh the page and try again

Export Contains No Files

Solutions:

  1. Ensure you have virtual files created
  2. Check file status (published vs draft)
  3. Verify files aren't filtered out

Common Import Issues

File Upload Fails

Symptoms: File upload doesn't complete Solutions:

  1. Check file is smaller than 10MB
  2. Ensure file is valid JSON format
  3. Verify Pro license is active
  4. Check WordPress upload limits

Import Creates Errors

Symptoms: Import completes with errors Solutions:

  1. Validate JSON file format
  2. Check for missing required fields
  3. Review error messages in import results
  4. Ensure file content is properly encoded

Best Practices

Backup Best Practices

  • Export files regularly (weekly/monthly)
  • Store backups in multiple locations
  • Test backup files by importing to staging site
  • Keep multiple backup versions for safety
  • Verify exported files contain all expected data

Import Best Practices

  • Test imports on staging site first
  • Backup current files before importing
  • Review import results carefully
  • Check file functionality after import
  • Resolve any errors immediately

Technical Details

What Gets Exported

  • Virtual file content
  • File metadata (name, MIME type, status)
  • Creation and modification dates
  • WordPress post data (title, slug, status)

What's Not Exported

  • Plugin settings
  • Analytics data
  • File access logs
  • Caching data
  • User permissions

Security Features

  • All content is sanitized during import
  • File paths are validated to prevent directory traversal
  • JSON structure is validated before processing
  • WordPress nonce verification for all operations

Next Steps

Now that you understand backup and restore functionality:

  1. Create Your First Backup: Export your virtual files
  2. Configure Plugin Settings: Optimize your setup
  3. Learn About Pro Features: Discover more advanced capabilities

Need Help?

Virtual Files - Better WordPress SEO Through Smart Virtual File Management