wp-cloudsync-master

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

CloudSync 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 list
    ,
    sync
    report-only)
  • 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
undefined

Install and activate the free version from WordPress.org

从WordPress.org安装并激活免费版

wp plugin install wp-cloudsync-master --activate
wp plugin install wp-cloudsync-master --activate

then upload and activate

然后上传并激活

wp plugin install /path/to/wp-cloudsync-master-pro.zip --activate
undefined
wp plugin install /path/to/wp-cloudsync-master-pro.zip --activate
undefined

CLI Command Overview

CLI命令概览

All commands follow:
wp cloudsync <command> [<subcommand>] [--flags]
CommandDescriptionVersion
status
Show sync status across all accountsFree (basic) / PRO (with queue info)
sync
Scan media library for unsynced filesFree (report only) / PRO (queues files)
accounts list
List configured accountsFree
accounts add/update/delete/activate/test/info
Full account managementPRO
queue
Manage upload queue (status/list/clear/process)PRO
settings
Manage plugin settings (list/get/set/reset)PRO
integrations
Manage plugin integrations (list/enable/disable/set)PRO
objects
Manage synced object records (list/reupload/delete)PRO
license
Manage PRO license (status/activate/deactivate)PRO (always available, even before activation)
config
Show configuration sources and generate wp-config.php snippetsPRO
migrate
Detect and import from competitor pluginsPRO
PRO CLI commands require the PRO plugin with an activated license. Without activation, only free commands and
license
(activate/deactivate/status) are available.
For the complete CLI reference with all flags and examples, read
references/cli_reference.md
.
所有命令遵循格式:
wp cloudsync <command> [<subcommand>] [--flags]
命令描述版本支持
status
显示所有账户的同步状态免费版(基础功能)/ PRO版(含队列信息)
sync
扫描媒体库中未同步的文件免费版(仅生成报告)/ PRO版(将文件加入队列)
accounts list
列出已配置的账户免费版
accounts add/update/delete/activate/test/info
完整的账户管理PRO版
queue
管理上传队列(状态/列出/清空/处理)PRO版
settings
管理插件设置(列出/获取/设置/重置)PRO版
integrations
管理插件集成(列出/启用/禁用/设置)PRO版
objects
管理已同步的对象记录(列出/重新上传/删除)PRO版
license
管理PRO版许可证(状态/激活/停用)PRO版(始终可用,即使激活前)
config
显示配置来源并生成wp-config.php代码片段PRO版
migrate
检测并从竞品插件导入配置PRO版
PRO版CLI命令需要激活许可证的PRO插件。未激活时,仅免费版命令和
license
命令(激活/停用/状态)可用。
如需包含所有参数和示例的完整CLI参考,请查看
references/cli_reference.md

Common Workflows

常见工作流

Initial Setup (from scratch)

初始设置(从零开始)

bash
undefined
bash
undefined

1. 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
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

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
undefined
wp cloudsync status --format=json
undefined

Provider-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 license
bash
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 account
bash
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 sources
Configuration 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

关键配置参考

SettingTypeDefaultDescription
createObjectOnFileUpload
boolnoUpload to cloud on media upload
rewriteFileUrlWithObjectUrl
boolnoReplace local URLs with cloud URLs
deleteObjectOnFileDelete
boolnoDelete from cloud when local file deleted
deleteFileAfterObjectCreated
boolnoRemove local file after cloud upload
createObjectsForExistingFiles
boolnoQueue existing media library for upload
uploadBatchSize
int10Files per upload batch (1-100)
uploadConcurrency
int1Concurrent uploads (1-10 via CLI, 1-20 via admin UI)
enableSignedDownloads
boolnoGenerate signed URLs for downloads
signedUrlExpirySeconds
int3600Signed URL lifetime in seconds (120-604800)
fallbackToLocalOnMissingRemote
boolyesServe local file if cloud file missing
Run
wp cloudsync settings list
for the complete list with min/max constraints.
配置项类型默认值描述
createObjectOnFileUpload
布尔值no媒体文件上传时同步至云存储
rewriteFileUrlWithObjectUrl
布尔值no用云存储URL替换本地URL
deleteObjectOnFileDelete
布尔值no删除本地文件时同时删除云存储中的文件
deleteFileAfterObjectCreated
布尔值no云存储上传完成后删除本地文件
createObjectsForExistingFiles
布尔值no将现有媒体库文件加入上传队列
uploadBatchSize
整数10每批上传的文件数量(1-100)
uploadConcurrency
整数1并发上传数(CLI支持1-10,管理界面支持1-20)
enableSignedDownloads
布尔值no生成用于下载的签名URL
signedUrlExpirySeconds
整数3600签名URL的有效期(秒,120-604800)
fallbackToLocalOnMissingRemote
布尔值yes当云存储文件缺失时,回退到本地文件
运行
wp cloudsync settings list
可查看包含最小/最大值限制的完整配置列表。

Supported Providers

支持的云服务商

ProviderIDAuthNotes
Amazon S3
s3
Access Key + SecretIndustry standard
Cloudflare R2
cloudflare_r2
Access Key + SecretZero egress fees
Google Cloud Storage
google
Service Account JSON or OAuthEnterprise-grade
DigitalOcean Spaces
digitalocean
Access Key + SecretS3-compatible
Backblaze B2
backblaze
Access Key + SecretCost-effective
Wasabi
wasabi
Access Key + SecretNo egress fees
Vultr Object Storage
vultr
Access Key + SecretS3-compatible
Linode Object Storage
linode
Access Key + SecretS3-compatible
MinIO
minio
Access Key + SecretSelf-hosted
Custom S3-Compatible
s3_compatible
Access Key + SecretAny S3 endpoint
服务商ID认证方式说明
Amazon S3
s3
访问密钥+密钥密码行业标准
Cloudflare R2
cloudflare_r2
访问密钥+密钥密码零出口费用
Google Cloud Storage
google
服务账户JSON或OAuth企业级
DigitalOcean Spaces
digitalocean
访问密钥+密钥密码兼容S3
Backblaze B2
backblaze
访问密钥+密钥密码高性价比
Wasabi
wasabi
访问密钥+密钥密码无出口费用
Vultr Object Storage
vultr
访问密钥+密钥密码兼容S3
Linode Object Storage
linode
访问密钥+密钥密码兼容S3
MinIO
minio
访问密钥+密钥密码自托管
自定义S3兼容
s3_compatible
访问密钥+密钥密码任何S3端点

Supported Competitor Migrations

支持的竞品插件迁移

PluginMigration ID
WP Offload Media
wp-offload-media
Media Cloud
media-cloud
Media Cloud Sync
media-cloud-sync
WP Stateless
wp-stateless
插件迁移ID
WP Offload Media
wp-offload-media
Media Cloud
media-cloud
Media Cloud Sync
media-cloud-sync
WP Stateless
wp-stateless

Environment Variable Configuration

环境变量配置

bash
undefined
bash
undefined

S3-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
undefined
ONETEAMSOFTWARE_CLOUDSYNC_MASTER_DISABLE_ACCOUNT_MANAGEMENT=true
undefined

Resources

资源

references/

references/

Detailed CLI reference with every command, subcommand, flag, and example:
  • references/cli_reference.md
    - Complete
    wp cloudsync
    CLI reference
包含所有命令、子命令、参数和示例的详细CLI参考:
  • references/cli_reference.md
    - 完整的
    wp cloudsync
    CLI参考文档