How to Move WordPress Uploads to Object Storage and Cut VPS Disk Use

Every image you upload to WordPress lands in the wp-content/uploads folder on your VPS. One photo is nothing. A year of posts, product shots, and thumbnails adds up to gigabytes, and on a small VPS that disk fills faster than you expect. When it fills, MySQL stops, uploads fail, and the site goes down. The fix is to move WordPress uploads to object storage: your media files live in a bucket instead of on the server, and the VPS only keeps the code and database.

This guide covers the whole move: picking storage, choosing a plugin, copying the files, and checking that nothing breaks. On a typical site it takes under an hour, most of it waiting for files to copy.

Why WordPress uploads eat VPS disk

WordPress stores every upload on the local disk, and it stores each image several times. One photo becomes the original plus thumbnail, medium, large, and any extra sizes your theme registers. A site with 500 photos can easily carry 3,000 files in the uploads folder. Add PDF downloads and a few years of posts, and that folder often becomes the biggest thing on the server.

Disk is the one resource you cannot fake on a VPS. RAM and CPU come back after a reboot; a full disk stops the database. That is why a disk-space alert is worth setting up before you start.

What WordPress object storage is

WordPress object storage is a flat place to keep files, addressed by a URL instead of a folder path. You put a file in a bucket and get back a link like https://media.example.com/2026/11/photo.jpg. There is no server to patch and no disk to resize.

Most offload plugins speak the S3 API, the common language for this kind of storage. The same plugin can point at Amazon S3, a cheaper S3-compatible provider, or a self-hosted MinIO server, and it handles the upload, the URL rewrite, and the deletion of the local copy.

Object storage is not a backup, and it is not a CDN by itself. Your media still needs a backup copy somewhere else, and a CDN in front of the bucket is what makes images load fast for visitors far from the storage region.

Pick storage: S3, S3-compatible, or self-hosted MinIO

Three options cover almost every WordPress site on a VPS. Prices below are approximate and change often, so check official pricing before you commit.

Amazon S3

S3 is the original and the safest default. Storage starts at roughly a couple of cents per gigabyte per month, plus small charges for requests and transfer out. Every plugin supports it, but the bill has several line items and grows with traffic.

S3-compatible providers: Backblaze B2, Wasabi, Cloudflare R2

S3-compatible storage keeps costs down while speaking the same API as S3, so the same plugins work unchanged. Backblaze B2 charges per gigabyte stored with the first 10 GB free, and egress is free up to a multiple of what you store. Wasabi charges a flat per-terabyte rate with no egress fees on most plans. Cloudflare R2 charges for storage and requests, with no egress fees at all, which suits image-heavy sites.

For most small WordPress sites, one of these three beats S3 on cost. The tradeoff is a smaller feature set and, in Wasabi’s case, minimum storage duration rules on some plans.

Self-hosted MinIO

MinIO is S3-compatible storage you run yourself, on a second VPS or a home server. You pay for the disk, not per gigabyte, and there are no request fees. It makes sense when you already run a second box and want full control. Try it first with a MinIO setup on a spare VPS before you point your live site at it, because a self-hosted bucket is only as reliable as the server under it.

Choose an offload plugin

You need a plugin that uploads new media to the bucket, rewrites the URLs in your content, and can move the old files for you. The two names that come up most are WP Offload Media and Media Cloud. WP Offload Media is the established option with a paid license; Media Cloud has a free core with paid add-ons.

Before you install anything, check three things. First, the plugin must support your storage provider, not just S3. Second, it must rewrite URLs in existing posts, not only in new uploads. Third, it must let you keep a local copy during the migration and delete it only after you confirm the move worked.

How to move WordPress uploads to object storage step by step

Step 1: Back up first

Take a full backup before you touch anything: database plus the whole wp-content/uploads folder. Store it off the server. If you do not have a backup routine yet, set one up first; separating uploads, database, and code makes this kind of job far less stressful.

Step 2: Create the bucket and keys

Create a bucket in your provider’s dashboard, pick a region close to your visitors, and turn on public read access, or set up a CDN in front of it. Then create an access key and secret key with permission to read and write that bucket only. Never use your provider account’s root keys for a WordPress plugin.

Step 3: Connect the plugin

Install the offload plugin, then paste in the bucket name, region, keys, and endpoint URL. S3 needs no endpoint; S3-compatible providers and MinIO do. Upload one test image and open its URL. If it loads from the bucket, the connection works; if not, check the endpoint and bucket permissions first.

Step 4: Copy the existing media library

Use the plugin’s bulk tool to offload WordPress media library files already on the server to the bucket. A library of a few hundred megabytes takes minutes; several gigabytes takes longer, so let it run in the background. Do not delete local files yet. Open five or six old posts and confirm the images load, including one post with a gallery and one with a PDF download.

Step 5: Rewrite URLs and remove local copies

Once the old files load from the bucket, let the plugin rewrite the URLs in your posts and remove the local copies. Do this in small batches if the plugin offers it, and watch the disk usage after each batch. Leave the backup from step 1 untouched for a week, so a broken image on a page you did not check can be restored from a single file.

What changes after the move

New uploads go straight to the bucket. WordPress still creates the thumbnail sizes, but the plugin sends each size to storage and removes the local copy after the copy succeeds.

Your VPS backup gets smaller and faster because the uploads folder is nearly empty. Your site backup now covers code and database, while the bucket needs its own backup plan: turn on versioning, or copy the bucket to a second provider on a schedule.

Visitors now fetch images from the storage provider instead of your VPS, which takes load off the server. Put a CDN in front of the bucket and images get faster too. If you already compress images before upload, keep doing it; offloading does not fix oversized originals, and an image optimization pipeline still pays for itself in load time.

Common problems and how to fix them

Images show as broken after the move

Check the bucket permissions first. The file may have copied fine but be private, so the browser gets a denied response. Make the bucket public, or attach a policy that allows public reads, then re-test. If only some images break, those files probably failed during the bulk copy; run the offload tool again for the missing items.

Old posts still point at the VPS

The bulk copy finished but the URL rewrite did not run, or it ran before the copy finished. Run the rewrite step again after confirming the files exist in the bucket, then search the database for the old uploads path to confirm nothing still references it.

Disk usage did not drop

The local copies are still there. Check the plugin setting that deletes local files after offload; it is often off by default. Turn it on, run the cleanup for files already in the bucket, and measure again. Sites that hoard uploads usually hoard revisions and transients too, so cleaning up database bloat pairs well with this step.

When object storage is the wrong call

Offloading is not worth it for every site. If your uploads folder is under 500 MB and your VPS disk is mostly empty, the move adds a plugin and a monthly bill to solve a problem you do not have.

The clearest sign you need it is a pattern: disk alerts every few months, uploads failing during busy weeks, or a backup that takes hours because it copies gigabytes of images. When that is the pattern, move WordPress media offsite.

Ditulis oleh

Firdaus Safari Putra

Founder, PT FirKaizen Digital Solutions

Firdaus Safari Putra adalah founder PT FirKaizen Digital Solutions. Ia membangun dan mengoperasikan infrastruktur server di balik panduan ini, dan menulis berdasarkan apa yang benar-benar ia jalankan, uji, dan ukur — bukan teori.