=== Opal Sync Media to Amazon S3 ===
Contributors: wpopal, khanhhv2240
Tags: aws, s3, media, cdn
Requires at least: 5.0
Tested up to: 6.9
Stable tag: 1.3.0
Requires PHP: 7.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

This plugin uploads files from the WordPress media directory to an AWS S3 bucket and replaces their original URLs with the corresponding S3 or CloudFront URLs.

== Description ==
Boost your media workflow in WordPress using S3-compatible object storage. This plugin allows you to offload media files to Amazon S3 for better performance and scalability. Optionally, you can configure Amazon CloudFront as a CDN to serve your media files faster.

== Features: ==
**Main Features**:
- **Manual or Automatic Media Scan**: Scan your media library manually or automatically using WP-Cron. You can configure the cron schedule to fit your needs.
- **Manual or Automatic Upload**: Upload scanned media files to S3 manually or automatically, with customizable scheduling similar to the scan feature.
- **CloudFront Integration**: Easily integrate Amazon CloudFront to serve media files via CDN, improving delivery speed.
- **Post Type Filtering**: Support scanning and uploading media files associated with specific post types only.
- **WP CLI Support**: Provides WP CLI commands for fast and bulk operations if you have command line access.

**Configuration Required**:
- **AWS S3 Access key:**: Access key provided by S3 Service.
- **AWS S3 Secret key:**: Secret key provided by S3 Service.
- **Bucket Name**: The name of your S3 bucket where media files will be stored.
- **Region**: The AWS region where your S3 bucket is located.
- **CloudFront URL (Optional)**: If you use Amazon CloudFront, provide the distribution URL for faster delivery.

[Free Support](https://wpopal.com/contact/)

== External Services ==
This plugin connects to Amazon S3 and optionally Amazon CloudFront to offload and serve media files. Below is detailed information about the external services:

1. **Service Name**: Amazon S3 (amazon.com)
   - **Purpose**: Used to store and serve media files (images, videos, documents, etc.) uploaded to the WordPress media library.
   - **Data Sent**: Media files (e.g., images, videos, documents) and metadata (e.g., file names, paths) are sent to the configured S3 bucket.
   - **When**: Data is sent when a file is uploaded to the WordPress media library or when the plugin syncs existing files to S3.
   - **Configuration Required**:
     - Bucket Name
     - AWS Region
   - **Terms of Service**: [Amazon S3 Terms of Service](https://aws.amazon.com/service-terms/)
   - **Privacy Policy**: [Amazon Privacy Policy](https://aws.amazon.com/privacy/)

2. **Optional Service**: Localstack (for testing environments localstack.cloud)
   - **Purpose**: Simulates Amazon S3 locally for testing purposes.
   - **Data Sent**: Media files and metadata are sent to the Localstack instance running on the developer's machine.
   - **When**: Data is sent when `OAWS_LOCALSTACK_MODE` is set to `true` in the plugin configuration.
   - **Configuration**: To enable Localstack, set the constant `OAWS_LOCALSTACK_MODE` to `true` in your WordPress configuration file.
   - **Documentation**: [Localstack Documentation](https://docs.localstack.cloud/)

3. **Optional Service**: Amazon CloudFront (if configured)
   - **Purpose**: Used as a Content Delivery Network (CDN) to serve media files faster by caching them closer to users.
   - **Data Sent**: URLs of media files stored in S3.
   - **When**: Data is sent when the plugin generates URLs for media files.
   - **Configuration Required**:
     - CloudFront Distribution URL
   - **Terms of Service**: [Amazon CloudFront Terms of Service](https://aws.amazon.com/service-terms/)
   - **Privacy Policy**: [Amazon Privacy Policy](https://aws.amazon.com/privacy/)

== Installation ==
1. Unzip the downloaded zip file.
2. Upload the plugin folder into the wp-content/plugins/' directory of your WordPress site.
3. Activate plugin 'Opal Sync Media to Amazon S3' from Plugins page.
4. Go to the plugin settings page and configure the required fields:
   - AWS S3 Access key
   - AWS S3 Secret key
   - S3 Bucket Name
   - AWS Region
   - (Optional) CloudFront Distribution URL

== Screenshots ==
1. Configuration Required
2. Cronjob for automatic handling
3. Handling tasks using WP CLI commands
4. Actions and Progress Details

== Changelog ==
= 1.0.0 - Released: Apr 10, 2025 =
* Initial release

== Upgrade Notice ==
= 1.3.0 - Update Core: =
* Compatible up to: WP 6.9
* Improve/Optimize processing speed

= 1.0 - Released: Apr 10, 2025 =
* Initial release