=== Swift Offload ===
Contributors: swiftplugins
Tags: s3, media offload, cdn, cloud storage, amazon s3
Requires at least: 5.6
Tested up to: 6.9
Stable tag: 1.0.3
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Offload WordPress media to Amazon S3, Wasabi, DigitalOcean Spaces, or MinIO. Serve files via CloudFront CDN for faster delivery.

== Description ==

**Swift Offload** is a powerful WordPress plugin that offloads your media library to cloud storage and delivers content through a CDN for improved performance and reduced server load.

= Why Use Swift Offload? =

* **Reduce Server Storage** - Free up disk space by storing media in the cloud
* **Faster Page Loads** - Serve media through CloudFront CDN
* **Scalable** - Handle unlimited media without server constraints
* **Cost Effective** - Use affordable storage providers like Wasabi

= Key Features =

* **Multiple Storage Providers** - Amazon S3, Wasabi, DigitalOcean Spaces, MinIO
* **CloudFront CDN** - Integrated CDN support with signed URLs for private content
* **Bulk Offload** - Background processing to offload existing media
* **Auto Offload** - Automatically offload new uploads
* **URL Rewriting** - Seamlessly rewrite media URLs in your content
* **Image Optimization** - WebP conversion and compression
* **Local File Removal** - Option to delete local copies after offload
* **WP-CLI Support** - Automate operations via command line
* **Modern Admin UI** - Clean, intuitive React-based interface

= Supported Storage Providers =

* **Amazon S3** - The industry standard for cloud storage
* **Wasabi** - S3-compatible with no egress fees
* **DigitalOcean Spaces** - Simple, affordable object storage
* **MinIO** - Self-hosted S3-compatible storage

= Privacy & Data =

Swift Offload respects your privacy:

* Does NOT collect any user data without consent
* Does NOT send data to external servers (except your configured cloud storage)
* Does NOT track users or collect analytics
* Stores cloud storage credentials securely in your WordPress database
* All media operations happen on your server

= Third-Party Libraries =

This plugin uses the following open-source libraries:

* React – MIT License
* Tailwind CSS – MIT License
* Radix UI – MIT License
* TanStack Query – MIT License
* Lucide Icons – ISC License
* Shadcn/ui – MIT License

= Source Code =

The original source code for all compiled assets is included in this plugin:

* React Admin App: `app/src/` directory
* SCSS Styles: `dev/scss/` directory
* JavaScript: `dev/js/` directory

Build tools used: Vite, TypeScript, PostCSS, Sass

To build from source:
`cd app && npm install && npm run build`

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/swift-offload` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Use the Settings -> Swift Offload screen to configure the plugin.
4. Enter your S3 credentials and bucket information.
5. Test the connection and start offloading your media.

== Frequently Asked Questions ==

= What storage providers are supported? =

Swift Offload supports Amazon S3 and S3-compatible storage providers including Wasabi, DigitalOcean Spaces, and MinIO (self-hosted).

= Will my existing media be offloaded? =

Yes, you can bulk offload existing media files using the built-in tools or WP-CLI commands. The plugin includes a batch processing system that handles large media libraries efficiently.

= Can I remove local files after offloading? =

Yes, Swift Offload includes an option to remove local files after they have been successfully offloaded to S3. This helps free up server disk space.

= Is my data secure? =

Yes. Your cloud storage credentials are stored securely in your WordPress database. All API calls to your storage provider use secure HTTPS connections.

= Does this work with CloudFront? =

Yes, Swift Offload has built-in CloudFront CDN support with signed URL capabilities for private content delivery.

= Can I migrate from another S3 plugin? =

Yes, Swift Offload includes a migration tool that can import settings and data from other popular S3 offload plugins.

= Is there WP-CLI support? =

Yes, Swift Offload provides comprehensive WP-CLI commands for automation:

* `wp swift-offload offload --all` - Offload all media
* `wp swift-offload remove-local --all` - Remove local copies
* `wp swift-offload rewrite-urls` - Rewrite URLs in content
* `wp swift-offload diagnostics` - Run diagnostics

== Screenshots ==

1. Dashboard overview
2. Storage configuration
3. CDN settings
4. Media management

== Changelog ==

= 1.0.3 =
* Fix: Remove programmatic plugin deactivation (deactivate_plugins) per WordPress guidelines
* Security: Use wpdb::prepare() for all SQL queries with dynamic IN clauses
* Fix: Reduce readme tags to 5 (WordPress.org limit)
* Fix: Match "Requires at least" version between readme.txt and plugin header

= 1.0.2 =
* Fix: Replace direct style/script output with wp_enqueue_style/script
* Fix: Restore source code for compiled assets (React, SCSS, JS)
* Fix: Use wp_safe_redirect instead of wp_redirect
* Fix: Remove bundled node_modules and source map files
* Security: Add proper escaping for SQL table names in uninstall

= 1.0.0 =
* Initial release
* Support for Amazon S3, Wasabi, DigitalOcean Spaces, MinIO
* CloudFront CDN integration with signed URLs
* Background job processing for bulk operations
* Image optimization with WebP conversion
* Modern React-based admin interface
* WP-CLI commands for automation
* Migration tool for other S3 plugins

== External Services ==

This plugin connects to external services only when explicitly configured by you:

= Cloud Storage Providers (User Configured) =

When you configure cloud storage, the plugin connects to your chosen provider to upload and manage media files.

* **Supported Providers:** Amazon S3, Wasabi, DigitalOcean Spaces, MinIO, CloudFront
* **Data Sent:** Your media files (only when you initiate offload operations)
* **When:** Only when you configure storage and perform offload/sync operations
* **Your Responsibility:** You must review and agree to the terms of service of your chosen storage provider:
  * Amazon S3: [AWS Terms](https://aws.amazon.com/service-terms/)
  * Wasabi: [Wasabi Terms](https://wasabi.com/legal/)
  * DigitalOcean: [DO Terms](https://www.digitalocean.com/legal/terms-of-service-agreement)


= Deactivation Feedback (Optional) =

When deactivating, you may optionally provide feedback to help us improve.

* **Service Provider:** Swift Plugins
* **Data Sent:** Feedback reason, comments (only if you choose to submit)
* **When:** Only when you voluntarily submit the feedback form
* **Terms of Use:** [Terms](https://swiftplugins.pro/terms-of-service/)
* **Privacy Policy:** [Privacy](https://swiftplugins.pro/privacy-policy/)

== Upgrade Notice ==

= 1.0.3 =
Fixes WordPress.org plugin review issues: SQL safety, plugin deactivation compliance, readme corrections.

= 1.0.2 =
Fixes WordPress.org review issues: proper asset enqueuing, source code included, security improvements.

= 1.0.0 =
Initial release of Swift Offload.
