Skip to content

Migrating a 200GB+ WordPress media library between hosts

rsync vs aws sync vs rclone, parallel transfer strategies, bandwidth budgets, and the verification step most migrations skip. A runbook for large WP media moves that complete in hours, not weekends.

A client signs the migration contract on Wednesday. Cutover is the following Sunday at 02:00. The new host is provisioned, the database transfer plan is solid — and then someone runs du -sh wp-content/uploads and reports 247GB. The default plan was rsync -av source: target:. At their measured 60 Mbit/s sustained transfer, that’s 9-11 hours just for the media. Your cutover window is four. The work isn’t difficult; it’s a matter of knowing which tool fits which leg, how to parallelize without crashing the source server, and how to verify nothing was missed.

What’s happening

Three transport tools cover the realistic options, and they’re not interchangeable:

rsync is the right answer when you have SSH between the source and target, the source is a Linux server you control, and you want a hash-based comparison that catches partial transfers. Its weakness is that it walks the tree single-threaded — for millions of files it spends most of its time enumerating, not transferring.

aws s3 sync (and equivalents like gcloud storage cp or gsutil rsync) is the right answer when the target is object storage. It parallelizes natively at the file level; you tune concurrency via aws configure set default.s3.max_concurrent_requests. Doesn’t speak SSH; the source must be a local filesystem on the machine running the CLI.

rclone is the most flexible. Speaks S3, B2, R2, SFTP, SMB, WebDAV, HTTP, dozens more. Has built-in parallelism (--transfers N, --checkers M), supports server-side copies between compatible backends, and has the best resumability story when transfers fail partway. Memory footprint is higher than rsync, but for a one-off migration that’s fine.

Beyond the tool, three constraints determine pacing:

Source disk I/O. A busy production WordPress site can already be I/O constrained. Adding a 100% read sequential workload from rsync or tar may push it into noticeable slowdown for live users. Measure baseline with iostat -xz 5 before starting; if %util is above 60% already, schedule the migration off-peak and throttle the transfer.

Network egress. Many shared and managed hosts have egress caps. A 247GB transfer in two hours is 350 Mbit/s sustained — many plans throttle below that, and some bill at premium rates for excess. Confirm with the source host’s policy before starting.

Target ingress + post-process. If the target is a bucket, ingress is usually free and concurrent uploads scale linearly. If the target is another VM, its disk I/O becomes the new bottleneck on the receive side. If post-transfer steps include WebP/AVIF conversion or thumbnail regeneration, plan for those after the bulk transfer, not concurrent.

The verification step is where most migrations cut corners. “It looked like it finished” is not verification. A reliable migration produces a hash manifest of the source, a hash manifest of the target, and a diff that proves they match.

How to verify

Before starting, build the baseline:

# Inventory on source
cd /home/acmewp/public_html/wp-content/uploads
find . -type f -printf '%s %p\n' | sort > /tmp/source-files.txt
wc -l /tmp/source-files.txt
awk '{s+=$1} END {printf "Total: %s bytes (%.2f GB)\n", s, s/1024/1024/1024}' /tmp/source-files.txt

# Sample SHA256 of 100 random files — full hash of 200GB is expensive, sample is sufficient for verification
find . -type f | shuf -n 100 | xargs -I {} sh -c 'echo "$(sha256sum {} | cut -d" " -f1)  {}"' > /tmp/source-sample.sha256

During transfer, monitor progress and source pressure:

# Watch transfer speed and source iostat in parallel
while true; do
  echo "=== $(date) ==="
  iostat -xz 1 1 | grep -E 'Device|sda|nvme'
  ss -tan | grep -c ESTAB
  sleep 10
done

After transfer, verify against the manifest:

# On target — reconstruct the manifest the same way
cd /target/uploads
find . -type f -printf '%s %p\n' | sort > /tmp/target-files.txt
diff /tmp/source-files.txt /tmp/target-files.txt | head -50

# Re-hash the same sample on target
while read line; do
  expected_hash="${line%% *}"
  file="${line##*  }"
  if [ -f "$file" ]; then
    actual_hash=$(sha256sum "$file" | cut -d' ' -f1)
    [ "$expected_hash" = "$actual_hash" ] || echo "MISMATCH: $file"
  else
    echo "MISSING: $file"
  fi
done < /tmp/source-sample.sha256

Any line of output is a failure to investigate before going live.

The fix

A staged runbook. Adapt the tool choice and the cutover window to your situation.

Step 0 — Pre-flight (T-7 days).

Inventory the source. Estimate transfer time at three different sustained rates (50, 100, 200 Mbit/s) so you have realistic boundaries. Confirm the source host’s egress allowance for the transfer window. Provision the target storage with enough headroom (target free space >= source size + 20%).

Step 1 — Initial bulk sync (T-3 to T-1 days, async).

Do a first pass days before the cutover. The site is still live and writing; that’s fine. The job is to get the bulk on target so the cutover-day pass is a delta, not a full transfer.

For VM-to-VM with SSH:

# Pre-cutover bulk rsync, throttled, ignore mtime updates we'll catch on the second pass
rsync -av \
  --bwlimit=80000 \
  --info=progress2 \
  --exclude='cache/' --exclude='*.tmp' \
  --partial --partial-dir=.rsync-partial \
  user@source:/home/acmewp/public_html/wp-content/uploads/ \
  /var/www/acmewp/wp-content/uploads/

For VM-to-bucket:

# Pre-cutover bulk push, high parallelism
aws configure set default.s3.max_concurrent_requests 32
aws configure set default.s3.multipart_threshold 64MB
aws configure set default.s3.multipart_chunksize 64MB

aws s3 sync /home/acmewp/public_html/wp-content/uploads/ \
  s3://acme-target/wp-content/uploads/ \
  --endpoint-url=https://s3.example.com \
  --no-progress --only-show-errors \
  --exclude "*/cache/*" --exclude "*.tmp"

For bucket-to-bucket between compatible providers (R2 ↔ S3, MinIO ↔ Garage), use rclone with server-side copy where supported:

rclone copy source-r2:acme-media/wp-content/uploads/ \
            target-r2:acme-media-new/wp-content/uploads/ \
            --transfers 32 --checkers 64 \
            --s3-no-check-bucket \
            --s3-upload-concurrency 8 \
            --progress

This first pass can take hours. Run it inside tmux or screen so a dropped SSH connection doesn’t kill it. Schedule for off-peak on the source side.

Step 2 — Delta sync (cutover-day, in cutover window).

At the start of the cutover window — site goes into maintenance or read-only — run a second pass. With rsync this is fast because most files match; the comparison walks the tree but transfers only what changed:

# Delta pass — minutes, not hours, if the bulk was complete
rsync -av --delete \
  --info=progress2 \
  user@source:/home/acmewp/public_html/wp-content/uploads/ \
  /var/www/acmewp/wp-content/uploads/

For aws s3 sync, the second pass is similarly fast — sync only re-uploads files whose size or mtime differs.

Step 3 — Verification (T+0, before going live).

Run the diff and sample-hash from the “How to verify” section. If the diff is empty and all sampled hashes match, the transfer is complete.

If the target is a bucket that will be served via a plugin like WP Offload Media, also verify the metadata layer:

# Quick sanity check that the plugin sees the migrated files
wp s3-uploads ls 2026/05/ 2>&1 | head
# or for WP Offload Media:
wp post list --post_type=attachment --posts_per_page=5 --format=ids | \
  xargs -I {} wp eval 'echo wp_get_attachment_url({}) . PHP_EOL;'

Step 4 — Cutover and cleanup.

Flip DNS, monitor for 404s and image errors for the first hour. Keep the source uploads directory in place (read-only) for 30 days as a fallback. Only delete after a full cycle of analytics and backup verification with the new target.

Bandwidth math worth knowing. At 100 Mbit/s sustained (12.5 MB/s real), 200GB takes ~4.5 hours; at 500 Mbit/s sustained (62.5 MB/s), ~55 minutes. The first pass at production rate sets the cutover-day expectation. Don’t promise a four-hour cutover window if your test transfer ran at 30 Mbit/s.

Parallel transfer pitfalls. aws s3 sync --no-progress with concurrency 32+ on a single 8GB-RAM VM will OOM if files are large and uploads queue. Either reduce multipart_chunksize or step down concurrency. rsync parallelized via parallel or xargs -P on disjoint subdirectories works well when the source has clean year/month structure — but always test on a small subset first; SSH connection churn can rate-limit on some hosts.


Stack Harbor runs large WordPress media migrations under our Migration practice — including the parallel transfer planning, the verification step, and the post-cutover watch. For media libraries north of 100GB or anything with regulatory constraints around data residency, start the conversation.

Stack Harbor operates production WordPress at scale — see Enterprise WordPress for the managed model, or book a WordPress consult for a written read of your current shape.