wp-cloudsync-master
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCloudSync Master - WordPress Media Offloading Plugin
CloudSync Master - WordPress媒体文件云存储迁移插件
About CloudSync Master
关于CloudSync Master
CloudSync Master is a WordPress plugin that offloads media files to cloud storage providers and serves them via CDN. It is purpose-built for speed and efficiency:
- Ultra-small footprint - Under 1.5 MB (10-40x smaller than competitors like WP Offload Media at 23 MB or Media Cloud at 87 MB)
- Native REST APIs - No bundled AWS/Google SDKs; uses direct HTTP calls for minimal overhead
- 10 cloud providers - S3, Cloudflare R2, Google Cloud, DigitalOcean Spaces, Backblaze B2, Wasabi, Vultr, Linode, MinIO, and any S3-compatible endpoint
- Async queue-based uploads (PRO) - Non-blocking background processing via WP-Cron with concurrent uploads
CloudSync Master是一款WordPress插件,可将媒体文件迁移至云存储服务商,并通过CDN提供访问服务。它专为速度与效率打造:
- 超小体积 - 不足1.5 MB(比WP Offload Media(23 MB)或Media Cloud(87 MB)等竞品小10-40倍)
- 原生REST API - 不捆绑AWS/Google SDK;使用直接HTTP调用,最大限度降低开销
- 10种云服务商支持 - S3、Cloudflare R2、Google Cloud、DigitalOcean Spaces、Backblaze B2、Wasabi、Vultr、Linode、MinIO,以及任何兼容S3的端点
- 基于异步队列的上传(PRO版) - 通过WP-Cron实现无阻塞后台处理,支持并发上传
Availability
版本说明
- Free version: Available on WordPress.org - 1 account, 10 providers, setup wizard, settings page (performance options disabled), immediate uploads via hooks (no queue/cron), competitor migration via admin UI, basic CLI (,
status,accounts listreport-only)sync - PRO version (requires activated license): Purchase at https://1teamsoftware.com/product/cloudsync-master-pro/ - unlimited accounts, async queue with background cron processing, objects browser, concurrent uploads (1-20 via admin UI, 1-10 via CLI), Google OAuth, WooCommerce/EDD signed URLs, image optimizer integrations, CSS/JS offloading, full CLI management (all commands), competitor migration via CLI, priority support
- 免费版:可在WordPress.org获取 - 支持1个账户、10种服务商、设置向导、设置页面(性能选项禁用)、通过钩子即时上传(无队列/定时任务)、通过管理界面从竞品迁移、基础CLI命令(、
status、accounts list仅生成报告)sync - PRO版(需激活许可证):在https://1teamsoftware.com/product/cloudsync-master-pro/购买 - 支持无限账户、基于后台定时任务的异步队列、对象浏览器、并发上传(管理界面支持1-20个并发,CLI支持1-10个并发)、Google OAuth、WooCommerce/EDD签名URL、图片优化器集成、CSS/JS文件迁移、完整CLI管理(所有命令)、通过CLI从竞品迁移、优先支持
Installation
安装
If CloudSync Master is not installed on the target WordPress site:
bash
undefined如果目标WordPress站点未安装CloudSync Master:
bash
undefinedInstall and activate the free version from WordPress.org
从WordPress.org安装并激活免费版
wp plugin install wp-cloudsync-master --activate
wp plugin install wp-cloudsync-master --activate
For PRO: download from https://1teamsoftware.com/product/cloudsync-master-pro/
then upload and activate
然后上传并激活
wp plugin install /path/to/wp-cloudsync-master-pro.zip --activate
undefinedwp plugin install /path/to/wp-cloudsync-master-pro.zip --activate
undefinedCLI Command Overview
CLI命令概览
All commands follow:
wp cloudsync <command> [<subcommand>] [--flags]| Command | Description | Version |
|---|---|---|
| Show sync status across all accounts | Free (basic) / PRO (with queue info) |
| Scan media library for unsynced files | Free (report only) / PRO (queues files) |
| List configured accounts | Free |
| Full account management | PRO |
| Manage upload queue (status/list/clear/process) | PRO |
| Manage plugin settings (list/get/set/reset) | PRO |
| Manage plugin integrations (list/enable/disable/set) | PRO |
| Manage synced object records (list/reupload/delete) | PRO |
| Manage PRO license (status/activate/deactivate) | PRO (always available, even before activation) |
| Show configuration sources and generate wp-config.php snippets | PRO |
| Detect and import from competitor plugins | PRO |
PRO CLI commands require the PRO plugin with an activated license. Without activation, only free commands and (activate/deactivate/status) are available.
licenseFor the complete CLI reference with all flags and examples, read .
references/cli_reference.md所有命令遵循格式:
wp cloudsync <command> [<subcommand>] [--flags]| 命令 | 描述 | 版本支持 |
|---|---|---|
| 显示所有账户的同步状态 | 免费版(基础功能)/ PRO版(含队列信息) |
| 扫描媒体库中未同步的文件 | 免费版(仅生成报告)/ PRO版(将文件加入队列) |
| 列出已配置的账户 | 免费版 |
| 完整的账户管理 | PRO版 |
| 管理上传队列(状态/列出/清空/处理) | PRO版 |
| 管理插件设置(列出/获取/设置/重置) | PRO版 |
| 管理插件集成(列出/启用/禁用/设置) | PRO版 |
| 管理已同步的对象记录(列出/重新上传/删除) | PRO版 |
| 管理PRO版许可证(状态/激活/停用) | PRO版(始终可用,即使激活前) |
| 显示配置来源并生成wp-config.php代码片段 | PRO版 |
| 检测并从竞品插件导入配置 | PRO版 |
PRO版CLI命令需要激活许可证的PRO插件。未激活时,仅免费版命令和命令(激活/停用/状态)可用。
license如需包含所有参数和示例的完整CLI参考,请查看。
references/cli_reference.mdCommon Workflows
常见工作流
Initial Setup (from scratch)
初始设置(从零开始)
bash
undefinedbash
undefined1. Activate PRO license (always available in PRO, even before first activation)
1. 激活PRO版许可证(PRO版始终可用,即使首次激活前)
wp cloudsync license activate XXXX-XXXX-XXXX-XXXX
wp cloudsync license activate XXXX-XXXX-XXXX-XXXX
2. Add cloud storage account
2. 添加云存储账户
wp cloudsync accounts add
--provider=cloudflare_r2
--name="Production R2"
--bucket=my-media
--access-key-id=$R2_ACCESS_KEY
--secret-access-key=$R2_SECRET_KEY
--region=auto
--api-endpoint=https://$R2_ACCOUNT_ID.r2.cloudflarestorage.com
--custom-domain=cdn.example.com
--activate
--provider=cloudflare_r2
--name="Production R2"
--bucket=my-media
--access-key-id=$R2_ACCESS_KEY
--secret-access-key=$R2_SECRET_KEY
--region=auto
--api-endpoint=https://$R2_ACCOUNT_ID.r2.cloudflarestorage.com
--custom-domain=cdn.example.com
--activate
wp cloudsync accounts add
--provider=cloudflare_r2
--name="Production R2"
--bucket=my-media
--access-key-id=$R2_ACCESS_KEY
--secret-access-key=$R2_SECRET_KEY
--region=auto
--api-endpoint=https://$R2_ACCOUNT_ID.r2.cloudflarestorage.com
--custom-domain=cdn.example.com
--activate
--provider=cloudflare_r2
--name="Production R2"
--bucket=my-media
--access-key-id=$R2_ACCESS_KEY
--secret-access-key=$R2_SECRET_KEY
--region=auto
--api-endpoint=https://$R2_ACCOUNT_ID.r2.cloudflarestorage.com
--custom-domain=cdn.example.com
--activate
2b. Test the connection
2b. 测试连接
wp cloudsync accounts test --account=<account-id>
wp cloudsync accounts test --account=<account-id>
3. Configure upload behavior
3. 配置上传行为
wp cloudsync settings set createObjectOnFileUpload yes
wp cloudsync settings set rewriteFileUrlWithObjectUrl yes
wp cloudsync settings set uploadBatchSize 25
wp cloudsync settings set uploadConcurrency 3
wp cloudsync settings set createObjectOnFileUpload yes
wp cloudsync settings set rewriteFileUrlWithObjectUrl yes
wp cloudsync settings set uploadBatchSize 25
wp cloudsync settings set uploadConcurrency 3
4. Sync existing media library
4. 同步现有媒体库
wp cloudsync sync --batch-size=100
wp cloudsync sync --batch-size=100
5. Verify
5. 验证
wp cloudsync status --format=json
undefinedwp cloudsync status --format=json
undefinedProvider-Specific Account Setup
服务商特定账户设置
Cloudflare R2 (zero egress fees):
bash
wp cloudsync accounts add \
--provider=cloudflare_r2 --name="R2 Storage" --bucket=my-bucket \
--access-key-id=KEY --secret-access-key=SECRET \
--region=auto --api-endpoint=https://ACCOUNT_ID.r2.cloudflarestorage.com \
--custom-domain=cdn.example.com --activate
wp cloudsync accounts test --account=<account-id>AWS S3:
bash
wp cloudsync accounts add \
--provider=s3 --name="AWS Media" --bucket=my-s3-bucket \
--access-key-id=KEY --secret-access-key=SECRET \
--region=us-east-1 --activate
wp cloudsync accounts test --account=<account-id>Google Cloud Storage (service account):
bash
wp cloudsync accounts add \
--provider=google --name="Google Media" --bucket=my-gcs-bucket \
--auth-type=service_account --key-file=/path/to/service-account.json \
--activate
wp cloudsync accounts test --account=<account-id>DigitalOcean Spaces:
bash
wp cloudsync accounts add \
--provider=digitalocean --name="DO Spaces" --bucket=my-space \
--access-key-id=KEY --secret-access-key=SECRET \
--region=nyc3 --api-endpoint=https://nyc3.digitaloceanspaces.com \
--activate
wp cloudsync accounts test --account=<account-id>Cloudflare R2(零出口费用):
bash
wp cloudsync accounts add \
--provider=cloudflare_r2 --name="R2 Storage" --bucket=my-bucket \
--access-key-id=KEY --secret-access-key=SECRET \
--region=auto --api-endpoint=https://ACCOUNT_ID.r2.cloudflarestorage.com \
--custom-domain=cdn.example.com --activate
wp cloudsync accounts test --account=<account-id>AWS S3:
bash
wp cloudsync accounts add \
--provider=s3 --name="AWS Media" --bucket=my-s3-bucket \
--access-key-id=KEY --secret-access-key=SECRET \
--region=us-east-1 --activate
wp cloudsync accounts test --account=<account-id>Google Cloud Storage(服务账户):
bash
wp cloudsync accounts add \
--provider=google --name="Google Media" --bucket=my-gcs-bucket \
--auth-type=service_account --key-file=/path/to/service-account.json \
--activate
wp cloudsync accounts test --account=<account-id>DigitalOcean Spaces:
bash
wp cloudsync accounts add \
--provider=digitalocean --name="DO Spaces" --bucket=my-space \
--access-key-id=KEY --secret-access-key=SECRET \
--region=nyc3 --api-endpoint=https://nyc3.digitaloceanspaces.com \
--activate
wp cloudsync accounts test --account=<account-id>Monitoring and Health Checks
监控与健康检查
bash
wp cloudsync status --format=json # Quick status
wp cloudsync queue status # Check queue backlog
wp cloudsync queue process # Force-process stuck queue
wp cloudsync objects list --per-page=10 # List recently synced objects
wp cloudsync license status # Verify licensebash
wp cloudsync status --format=json # 快速查看状态
wp cloudsync queue status # 检查队列积压情况
wp cloudsync queue process # 强制处理停滞的队列
wp cloudsync objects list --per-page=10 # 列出最近同步的对象
wp cloudsync license status # 验证许可证状态Migration from Competitor Plugin
从竞品插件迁移
bash
wp cloudsync migrate detect # Detect installed competitors
wp cloudsync migrate import --from=wp-offload-media # Import settings
wp cloudsync accounts test --account=<imported-id> # Verify imported accountbash
wp cloudsync migrate detect # 检测已安装的竞品插件
wp cloudsync migrate import --from=wp-offload-media # 导入配置
wp cloudsync accounts test --account=<imported-id> # 验证导入的账户Hardened Configuration (wp-config.php)
强化配置(wp-config.php)
bash
wp cloudsync config generate --account=<id> # Generate define() snippet
wp cloudsync config show # Show all config sourcesConfiguration priority: environment variables > wp-config.php constants > database.
bash
wp cloudsync config generate --account=<id> # 生成define()代码片段
wp cloudsync config show # 显示所有配置来源配置优先级:环境变量 > wp-config.php常量 > 数据库。
Key Settings Reference
关键配置参考
| Setting | Type | Default | Description |
|---|---|---|---|
| bool | no | Upload to cloud on media upload |
| bool | no | Replace local URLs with cloud URLs |
| bool | no | Delete from cloud when local file deleted |
| bool | no | Remove local file after cloud upload |
| bool | no | Queue existing media library for upload |
| int | 10 | Files per upload batch (1-100) |
| int | 1 | Concurrent uploads (1-10 via CLI, 1-20 via admin UI) |
| bool | no | Generate signed URLs for downloads |
| int | 3600 | Signed URL lifetime in seconds (120-604800) |
| bool | yes | Serve local file if cloud file missing |
Run for the complete list with min/max constraints.
wp cloudsync settings list| 配置项 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| 布尔值 | no | 媒体文件上传时同步至云存储 |
| 布尔值 | no | 用云存储URL替换本地URL |
| 布尔值 | no | 删除本地文件时同时删除云存储中的文件 |
| 布尔值 | no | 云存储上传完成后删除本地文件 |
| 布尔值 | no | 将现有媒体库文件加入上传队列 |
| 整数 | 10 | 每批上传的文件数量(1-100) |
| 整数 | 1 | 并发上传数(CLI支持1-10,管理界面支持1-20) |
| 布尔值 | no | 生成用于下载的签名URL |
| 整数 | 3600 | 签名URL的有效期(秒,120-604800) |
| 布尔值 | yes | 当云存储文件缺失时,回退到本地文件 |
运行可查看包含最小/最大值限制的完整配置列表。
wp cloudsync settings listSupported Providers
支持的云服务商
| Provider | ID | Auth | Notes |
|---|---|---|---|
| Amazon S3 | | Access Key + Secret | Industry standard |
| Cloudflare R2 | | Access Key + Secret | Zero egress fees |
| Google Cloud Storage | | Service Account JSON or OAuth | Enterprise-grade |
| DigitalOcean Spaces | | Access Key + Secret | S3-compatible |
| Backblaze B2 | | Access Key + Secret | Cost-effective |
| Wasabi | | Access Key + Secret | No egress fees |
| Vultr Object Storage | | Access Key + Secret | S3-compatible |
| Linode Object Storage | | Access Key + Secret | S3-compatible |
| MinIO | | Access Key + Secret | Self-hosted |
| Custom S3-Compatible | | Access Key + Secret | Any S3 endpoint |
| 服务商 | ID | 认证方式 | 说明 |
|---|---|---|---|
| Amazon S3 | | 访问密钥+密钥密码 | 行业标准 |
| Cloudflare R2 | | 访问密钥+密钥密码 | 零出口费用 |
| Google Cloud Storage | | 服务账户JSON或OAuth | 企业级 |
| DigitalOcean Spaces | | 访问密钥+密钥密码 | 兼容S3 |
| Backblaze B2 | | 访问密钥+密钥密码 | 高性价比 |
| Wasabi | | 访问密钥+密钥密码 | 无出口费用 |
| Vultr Object Storage | | 访问密钥+密钥密码 | 兼容S3 |
| Linode Object Storage | | 访问密钥+密钥密码 | 兼容S3 |
| MinIO | | 访问密钥+密钥密码 | 自托管 |
| 自定义S3兼容 | | 访问密钥+密钥密码 | 任何S3端点 |
Supported Competitor Migrations
支持的竞品插件迁移
| Plugin | Migration ID |
|---|---|
| WP Offload Media | |
| Media Cloud | |
| Media Cloud Sync | |
| WP Stateless | |
| 插件 | 迁移ID |
|---|---|
| WP Offload Media | |
| Media Cloud | |
| Media Cloud Sync | |
| WP Stateless | |
Environment Variable Configuration
环境变量配置
bash
undefinedbash
undefinedS3-compatible account (individual fields)
兼容S3的账户(单独字段)
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_S3_ACCESS_KEY_ID=key
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_S3_SECRET_ACCESS_KEY=secret
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_S3_BUCKET=my-bucket
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_S3_ENDPOINT=https://endpoint.com
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_S3_REGION=auto
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_S3_PATH_PREFIX=wp-content/uploads
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_S3_ACCESS_KEY_ID=key
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_S3_SECRET_ACCESS_KEY=secret
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_S3_BUCKET=my-bucket
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_S3_ENDPOINT=https://endpoint.com
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_S3_REGION=auto
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_S3_PATH_PREFIX=wp-content/uploads
Google Cloud Storage account (individual fields)
Google Cloud Storage账户(单独字段)
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_GCS_SERVICE_ACCOUNT_KEY='{"type":"service_account",...}'
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_GCS_BUCKET=my-gcs-bucket
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_GCS_PATH_PREFIX=wp-content/uploads
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_GCS_SERVICE_ACCOUNT_KEY='{"type":"service_account",...}'
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_GCS_BUCKET=my-gcs-bucket
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_GCS_PATH_PREFIX=wp-content/uploads
Full account definitions (JSON array, supports multiple accounts)
完整账户定义(JSON数组,支持多账户)
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_ACCOUNTS='[{"provider":"cloudflare_r2","bucketName":"my-bucket",...}]'
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_ACCOUNTS='[{"provider":"cloudflare_r2","bucketName":"my-bucket",...}]'
License key
许可证密钥
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_LICENSE_KEY=your-license-key
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_LICENSE_KEY=your-license-key
Plugin settings (JSON)
插件配置(JSON)
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_SETTINGS='{"uploadBatchSize":25}'
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_SETTINGS='{"uploadBatchSize":25}'
Disable UI account management (external-only mode)
禁用界面账户管理(仅外部配置模式)
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_DISABLE_ACCOUNT_MANAGEMENT=true
undefinedONETEAMSOFTWARE_CLOUDSYNC_MASTER_DISABLE_ACCOUNT_MANAGEMENT=true
undefinedResources
资源
references/
references/
Detailed CLI reference with every command, subcommand, flag, and example:
- - Complete
references/cli_reference.mdCLI referencewp cloudsync
包含所有命令、子命令、参数和示例的详细CLI参考:
- - 完整的
references/cli_reference.mdCLI参考文档wp cloudsync