Skip to content
Stowaway

Documentation

Setting up and running Stowaway

Stowaway is a free, open-source WordPress plugin that copies your Media Library to your own Amazon S3 bucket and serves it through CloudFront. This guide covers everything from an empty AWS account to the command line. Most sites only need the first five sections. The setup wizard in the plugin walks you through those too, and links back here at each step.

For Stowaway 1.0.2. Updated .

Getting started

What you need

  • WordPress 6.2 or later, on PHP 7.4 or later.
  • An AWS account. That’s all. The wizard walks you through creating the bucket, the access key and the CloudFront distribution. No account yet? Create one.
  • About 15 minutes.

Stowaway doesn’t use the AWS SDK or Composer. There’s nothing extra to install on the server.

Install

  1. In WordPress, go to Plugins → Add New, search for Stowaway, then install and activate it. It’s also on WordPress.org if you’d rather download the zip.
  2. Go to Settings → Stowaway and follow the setup wizard. You’ll create three things in your AWS account, in this order:
  3. To copy media you uploaded before Stowaway, use Offload Existing Media on the same screen.
Coming from WP Offload Media? Don’t run the wizard. Deactivate WP Offload Media and use Import from WP Offload Media instead. That way your media keeps its URLs.

Stowaway does nothing until it has a bucket and a key, so it’s safe to activate on a live site.

Step 1: Bucket

An S3 bucket is where your media lives. Use a new one just for this site. In the AWS console, open S3 → Create bucket. Only two settings need a decision:

Bucket name
Lowercase letters, numbers and dashes. The wizard suggests one from your site’s address, like example-com-media. Bucket names are shared across all of AWS. If yours is taken, add a few letters.
AWS Region
Pick the one closest to your website’s server, because that’s where uploads come from. It doesn’t need to be near your visitors. CloudFront gets media to them wherever they are.

Leave everything else as AWS sets it. In particular:

  • Object Ownership: ACLs disabled (bucket owner enforced).
  • Block all public access: on. CloudFront reads the bucket for your visitors. Nobody else needs to.
  • Bucket Versioning: off. Stowaway’s Give each upload its own folder setting already gives a replaced file a new URL. S3 versioning would just keep the old copies and bill you for them.
  • Default encryption: SSE-S3, AWS’s default.

Choose Create bucket, then type its name into the wizard. You don’t pick a region in Stowaway. Once it has an access key in the next step, it finds the bucket’s region by itself.

Already have a bucket? Enter its name instead.

Wizard step 1: how to create the bucket, with a suggested name, and the Bucket name field.
Step 1 of the wizard, with a bucket name suggested from the site’s address.
Bucket names with dots in them (like media.example.com) work, but S3 has to use path-style URLs for them. Use dashes and you won’t have to think about it.

To switch buckets after setup, use Change next to the bucket on the settings screen. Media you’ve already offloaded stays in its old bucket and keeps being served from there.

Step 2: Access key

An access key lets your site use the bucket. Create it for an AWS user that exists just for this site. That user can touch this one bucket and nothing else. Never use your AWS account’s root keys.

  1. In the AWS console, open IAM → Users → Create user. Name the user after the site, e.g. stowaway-example-com, and leave console access off.
  2. On the permissions page choose Attach policies directly, then Create policy. Switch the editor to JSON. Paste in the policy below and save it. Back on the user, attach the new policy and create the user.
  3. Open the new user and go to Security credentials. Choose Create access key, then Application running outside AWS.
  4. Copy the access key ID and secret access key into the wizard. AWS shows the secret only once.
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": ["s3:ListBucket"],
            "Resource": "arn:aws:s3:::your-bucket-name"
        },
        {
            "Effect": "Allow",
            "Action": ["s3:PutObject", "s3:DeleteObject"],
            "Resource": "arn:aws:s3:::your-bucket-name/*"
        }
    ]
}

The wizard shows this policy with your bucket’s name already filled in. If you copy it from here, replace your-bucket-name with your bucket’s name in both places.

That’s all Stowaway needs. It can see the bucket and add or remove files in it. It never reads files back, because visitors get them from CloudFront. So the policy doesn’t allow reading.

Wizard step 2: the IAM policy with the bucket's name filled in, and the access key fields.
Step 2, with the policy already naming the bucket from step 1.

What happens when you save

Stowaway checks the key with AWS, finds the bucket’s region and makes sure the key can use the bucket. If all of that works, it moves on to CloudFront. If not, it tells you what went wrong:

AWS does not accept these access keys
The key ID or secret is wrong, or the key was deleted. Copy them again, or create a new key.
There is no bucket named …
The wizard goes back to step 1. Check the name for typos against the S3 console.
AWS accepted the access key, but it is not allowed to use the … bucket
The key is fine, but its policy is missing or names a different bucket. Check that the policy is attached to the user, with this bucket’s name in it, then save again.

Keeping keys in wp-config.php

Keys saved in the wizard live in the database, which means they’re in every database backup too. To keep them out, define them in wp-config.php instead. Put them above the line that says “That’s all, stop editing!”:

define( 'STOWAWAY_ACCESS_KEY_ID', 'your-access-key-id' );
define( 'STOWAWAY_SECRET_ACCESS_KEY', 'your-secret-access-key' );

The wizard’s key step then has nothing for you to type. It uses these and just checks the bucket. While they’re set, Stowaway never stores keys in the database. With no keys in either place, it falls back to WP Offload Media’s AS3CF_SETTINGS constant if you have one.

Keys saved in the database get an option of their own. WordPress only loads it to upload, delete or show the settings screen. It isn’t loaded on every page.

Step 3: CloudFront

CloudFront delivers your media to visitors from servers near them. It’s the only part of AWS allowed to read the bucket, so the bucket stays private.

  1. In the AWS console, open CloudFront → Create distribution. Name it after your site and choose Single website or app.
  2. Skip Domain setup for now. To use your own domain, see below.
  3. For the origin type choose Amazon S3, then Browse S3 and pick your bucket. Keep Use recommended origin settings. That sets up origin access control, which is how CloudFront reads a private bucket.
  4. On Enable security protections, either choice works with Stowaway. AWS WAF can add a monthly charge.
  5. Review and choose Create distribution. CloudFront updates the bucket’s policy so it can read the bucket. If it shows you a policy to copy instead, paste it into the bucket’s Permissions → Bucket policy.
  6. Copy the distribution’s domain name (like d1234abcd.cloudfront.net) into the wizard and choose Finish Setup. Use this domain even if you want your own. You can switch to yours once setup works.
Wizard step 3: how to create the CloudFront distribution, the CloudFront domain field, and the Finish Setup and Skip for Now buttons.
Step 3, with Finish Setup and Skip for Now.

The console may also ask you to pick a pricing plan. That’s either pay-as-you-go or one of CloudFront’s flat-rate plans. Stowaway works with any of them. See What it costs.

When you finish

Finish Setup saves everything and runs the connection test. Media only switches to CloudFront once the test passes. That way a domain that isn’t working yet can’t break your site’s images.

If the test fails, setup is still saved. Media keeps coming from your own server, and the settings screen says “Media is still served from this server, and switches to … once Test Connection passes.” A new distribution takes a few minutes to deploy, and that’s often the only problem. Wait a bit, then choose Test Connection. When it passes, media switches over by itself (“The connection test passed, so media is now served from CloudFront.”). Ticking Serve media from CloudFront by hand switches it on too, without waiting for the test.

Skip for now

Skip for Now finishes setup without CloudFront. Media keeps coming from your own server. New uploads still go to the bucket, ready for when you add CloudFront. The settings screen shows a Set up CloudFront link. Save a domain there and delivery switches on.

Using your own domain

You can serve media from a subdomain such as media.example.com instead of d1234abcd.cloudfront.net. Finish setup with the cloudfront.net domain first, so media already works. Then let CloudFront set up your domain. It requests the certificate itself, and with Route 53 it adds every DNS record too.

  1. Add the domain. In the CloudFront console, open the distribution. Under Settings → Alternate domain names, choose Add a domain. Enter media.example.com and choose Next.
  2. Let CloudFront make the certificate. If you don’t have one for the subdomain, CloudFront creates it. It goes in AWS Certificate Manager in us-east-1, the only region CloudFront takes certificates from.
    • Route 53: CloudFront adds the validation record for you.
    • Any other DNS provider: add the validation record CloudFront shows you. It’s a CNAME whose name starts with an underscore (like _97d8….media.example.com). Its value ends in acm-validations.aws. Then choose Validate certificate.
    Choose Next, check everything over, then choose Add domains.
  3. Point the subdomain at the distribution. On the distribution’s settings, choose Route domains to CloudFront. With Route 53, CloudFront can set up the routing itself. Elsewhere, add a CNAME record named media whose value is the distribution’s d….cloudfront.net domain.
  4. Switch Stowaway over. On Settings → Stowaway, change the CloudFront domain to media.example.com and run Test Connection. New DNS records can take a few minutes to work everywhere. Sometimes it’s up to half an hour.
Don’t make a record named media to validate the certificate. The validation record’s name is the long one starting with an underscore. A media CNAME pointing at it points your subdomain at nothing, so the connection test can’t find it. It also blocks CloudFront’s own DNS setup in Route 53, with a “conflicting RRSet of type CNAME” error. If you made one, delete it and carry on from step 3.

Requesting the certificate yourself

You can also request the certificate yourself in AWS Certificate Manager. Make it a public certificate for the subdomain, in US East (N. Virginia) us-east-1, with DNS validation. Validate it the same way. (On Route 53, that’s Create records in Route 53.) Wait until it says Issued. Then pick it in step 2 above instead of letting CloudFront make one.

Use one route, not both. If you’ve started a certificate by hand, finish it or delete it before letting CloudFront create one. Two half-finished certificates for the same subdomain means two validation records. That’s usually how the DNS mistake above happens.

Media is always served over HTTPS.

Connection test

Finishing the wizard runs the connection test. You can run it again any time with Test Connection on the settings screen. It follows the same path a real upload takes:

StepWhat it checksIf it fails
Reach the bucketThe keys work and can see the bucket.Usually a missing s3:ListBucket, or the wrong bucket name or region.
Upload a fileWrites a small test file into the bucket.The policy needs s3:PutObject on the bucket’s objects.
Load it through CloudFrontFetches the file the way a visitor’s browser would.See Troubleshooting: usually origin access or the bucket policy.
Delete the fileRemoves the test file again.The policy needs s3:DeleteObject. Remove the test file by hand.

Say there’s no CloudFront domain and Serve media from CloudFront is off, as after Skip for now. Then the loading step shows as Load it like a visitor, marked –, with “Skipped: media is served from this server until you add CloudFront.” That isn’t a failure. With no CloudFront domain but serving turned on, the step becomes Load it from S3. A private bucket refuses that. See Troubleshooting.

If setup’s switch to CloudFront is still waiting on a passing test, the next pass switches media over.

The results say exactly which step failed and why. Paste them into a support request and you’ll save a round of questions.

Stowaway settings: Storage, Delivery and Media Library status cards, a passing connection test, and the delivery switches.
A passing connection test, under the status cards.

Offloading existing media

New uploads go to the bucket on their own. Anything you uploaded before setting up Stowaway stays on your server until you offload it.

On Settings → Stowaway, use Offload Existing Media. It works through the library in short batches, with a progress bar. Every size of every file the bucket doesn’t have yet gets uploaded. Keep the page open until it finishes. If you close it, just run it again later. It picks up where it left off.

If a file fails, the run carries on without it. The Media Library shows the reason, and the next run tries that file again.

Offload Existing Media, with a progress bar part way through.
Offloading the existing library, part way through.

For big libraries the command line is faster, and you don’t need a browser tab open. Run wp stowaway offload --all. See WP-CLI.

In the Media Library

The list view of Media → Library gets a new Offload column:

In bucket
Every size of the file is in the bucket, and visitors load it from there.
N files still to upload
Some sizes aren’t in the bucket yet. Offload now uploads them.
Error
The last attempt failed, with AWS’s reason. Offload now tries again.

To offload several files at once, select them and choose Offload to S3 from the bulk actions. You’ll see the same status in each attachment’s details.

Delete a file from the Media Library and Stowaway deletes it from the bucket too, with all its sizes. Files another attachment still uses are left alone.

The WordPress Media Library list view with Stowaway's Offload column.
The Offload column in the Media Library.

Settings reference

Once the wizard is done, Settings → Stowaway has four tabs: Settings, Safety (see Outages and failover), Support and About.

The Settings tab opens with three status cards:

Storage
The bucket and its region. Change links reopen the key and bucket steps.
Delivery
The CloudFront domain, or a note that media is served from this server. During an outage it warns “AWS isn’t responding: serving your copies meanwhile”.
Media Library
How much of the library is offloaded, with a progress bar.

Under the cards, a line says when the connection test last passed. Then come the settings:

SettingDefaultWhat it does
Copy new uploads to your bucketOnEvery image and file you upload, and every size WordPress makes of it, is copied to S3. Your server keeps its copy too.
Serve media from CloudFrontOnVisitors load images from Amazon’s servers instead of yours. Turn it off at any time to serve them from your server again. Nothing is lost. While local copies are being removed, it stays on until they’re brought home. Skipping CloudFront during setup turns it off, so a private bucket never serves broken images.
CloudFront domainEmptyYour distribution’s domain, or your own domain pointed at it. Leave it blank with serving on and media comes straight from S3. That only works if the bucket allows public reads.

The rest is folded away under Advanced, along with the IAM policy the key needs:

SettingDefaultWhat it does
Catch images anywhere on the pageOffRewrites media URLs anywhere on the page, not just in post content. It’s for page builders and themes that print images elsewhere, like Divi’s background images and header logo. Leave it off unless some images still load from your server. Needs WordPress 6.9 or later; on older versions it does nothing.
Give each upload its own folderOnAdds a unique folder to each upload’s address, e.g. 2025/12/12174237/photo.jpg. A replaced image then gets a new URL, so it never shows up stale. Media can be cached for a year.
Folder in the bucketwp-content/uploads/Where new uploads go in the bucket. Leave blank for the top of the bucket.
The Advanced settings: Catch images anywhere on the page, Give each upload its own folder, and Folder in the bucket.
Advanced, opened.

Uploads never overwrite a file already in the bucket. If a new upload’s name is already taken, it goes into a fresh folder instead. (That can only happen with Give each upload its own folder off.) Changing Folder in the bucket or Give each upload its own folder only affects new uploads. Files you’ve already offloaded stay where they are.

Outages and failover

If AWS stops serving your images, every image on your site breaks at once. It can happen when an unpaid bill suspends the account, a key or distribution gets deleted, or DNS breaks. The Safety tab watches for it, under Watch for AWS outages:

SettingDefaultWhat it does
Check every hour that images load from CloudFrontOnLoads a few of your newest offloaded images through CloudFront, the way a visitor would. It’s one small request an hour. One image loading is enough. A single file deleted from the bucket by hand doesn’t count as an outage.
Serve images from this server during an outageOnAfter two failed checks in a row, visitors get images from your server’s own copies. Page caches are cleared too. When CloudFront works again, Stowaway switches back by itself.
Send alerts toAdmin emailWhere outage and upload alerts go. Leave blank for the site’s admin email.
The Safety tab: outage monitoring, failover, alert address, and local copies.
The Safety tab.

The check only runs while media comes from a CloudFront domain. It runs on WP-Cron. If your site sets DISABLE_WP_CRON, a real cron job has to call wp-cron.php. Otherwise the check never runs. To check straight away, use Check Now on the Safety tab or wp stowaway health. Before the first hourly check, the tab says “Not checked yet: the first check runs within the hour.”

During an outage

  • A red notice shows on every admin screen. The Delivery card warns “AWS isn’t responding: serving your copies meanwhile”.
  • The Safety tab says how long AWS has been down and why: “AWS hasn’t been serving your images for 3 hours. Your site is serving them from this server meanwhile.” With failover off, it warns that visitors may see broken images instead.
  • Failover can only serve files that are still on your server. If you removed local copies, those images stay broken until AWS is back.
Stowaway settings during an outage: a red notice, and the Delivery card showing images served from this server.
The Settings tab during an outage.
The Safety tab during an outage, saying how long AWS has been down and why.
The Safety tab, with the reason the check failed.

Alerts

Stowaway emails the alert address:

  • when images stop loading from AWS;
  • when they load again, and whether it has switched back;
  • when AWS refuses uploads, at most once a day. That happens after a key is deleted or the account is suspended.

The outage email reads:

[Your Site] Images aren’t loading from AWS

Stowaway checks every hour that https://example.com’s images load from d1a2b3c4d5e6f7.cloudfront.net. The last two checks failed: (the error)

What Stowaway did: your site now serves images from your own server, so visitors see them as normal. When AWS answers again, Stowaway switches back and emails you.

Worth checking: your AWS bill (a suspended account stops CloudFront), the CloudFront distribution, and your domain’s DNS.

Alerts go out through your site’s own email, like any other WordPress notification. If your site’s mail is unreliable, an SMTP plugin fixes that for these too.

Page caches

Switching to your server’s copies and back changes every image URL. So Stowaway clears page caches both times. It knows W3 Total Cache, WP Rocket, WP Super Cache, LiteSpeed Cache, WP Fastest Cache, SiteGround Optimizer, Breeze and Divi’s static CSS. For anything else, developers can hook stowaway_purge_caches.

Caches outside WordPress aren’t cleared. That means your host’s cache, or a CDN in front of the site like Varnish or Cloudflare. Purge those by hand, or keep their page cache times short.

Removing local copies

By default, Stowaway keeps a copy of every file on your server as well as in the bucket. That copy lets your site fall back to its own images during an outage. It also lets you turn delivery off at any time. If your server is short on disk space, you can remove local copies once files are safely in the bucket.

On the Safety tab, find Files on this server. Turn on Remove local copies after offloading, tick the “I understand” box and save. From then on, each new file’s local copy is deleted a minute after it reaches the bucket. Stowaway first checks that it loads from CloudFront.

For media you offloaded before turning it on, use Remove Local Copies under Remove local copies now. Or run wp stowaway remove-local --all.

Remove local copies turned on, with the warning about depending on AWS alone, and the button for existing media.
Remove local copies, turned on.
Your images then depend on AWS alone. Failover can’t serve images your server no longer has. And Serve media from CloudFront stays on until you bring the files home.
  • Editing an image fetches it back from the bucket first, so the image editor works as usual.
  • Regenerating thumbnails needs the originals on the server, and so do other tools that rework existing images. Bring files home first.
  • Nothing is removed during an outage, on a staging copy, or while media isn’t coming from a CloudFront domain.

Bring it all home

Your media is never locked in. Bring It All Home on the Safety tab downloads every file your server is missing from the bucket. It fetches them through CloudFront, so it needs no extra AWS permission.

Use it:

Turn off Remove local copies first, or the files would just be removed again. The button stays disabled until you do. From the command line, run wp stowaway download --all.

The Bring it all home card, with its command-line equivalent.
Bring it all home, on the Safety tab.

Moving from WP Offload Media

Stowaway reads the settings and offload records that WP Offload Media (Lite or Pro) left in your database. Media you offloaded with it keeps its exact URLs, versioned folders included. Nothing is uploaded again. Page caches, page builders’ cached CSS and old links in emails all keep working.

  1. Back up the database.
  2. Install and activate Stowaway. It does nothing until the import runs.
  3. Deactivate WP Offload Media. Don’t delete it yet. It’s your way back. Running both at once means double uploads and two plugins rewriting URLs.
  4. On Settings → Stowaway, choose Import from WP Offload Media with its settings box ticked. It brings over the bucket, region, path, CloudFront domain and every offload record.
  5. Run Test Connection. If Reach the bucket fails with access denied, the old key needs s3:ListBucket. See the policy.
  6. Check a few pages in a private window. Image URLs should be on your CloudFront domain, exactly as before.
  7. Run Offload Existing Media to pick up anything uploaded since WP Offload Media stopped running.

Stowaway uses the keys in WP Offload Media’s AS3CF_SETTINGS constant until you give it its own. So you don’t need to edit wp-config.php on the day. Once you’re happy, move the keys to Stowaway’s own constants. Then remove AS3CF_SETTINGS and delete WP Offload Media.

To roll back, deactivate Stowaway and reactivate WP Offload Media. Anything uploaded in between loads from your server, and that works fine.

Old media loads, but new uploads don’t? Some WP Offload Media setups make every file public and let CloudFront read the bucket as an anonymous visitor, with no origin access control. Your existing media keeps loading. But Stowaway uploads files private, so CloudFront can’t load them until it uses origin access control. If that’s your setup, the connection test says so. The fix is in CloudFront, and existing media keeps working while you make it. It’s under Troubleshooting. Don’t try to fix it by turning on the bucket’s “ACLs disabled” or “Block all public access” first. Either one breaks every old image.
Used “Remove local files”? If WP Offload Media deleted your local copies, the bucket has the only copy. The import still works and keeps serving from the bucket. But turning delivery off would break those images. Use Bring it all home to download them back to your server.

Private, signed-URL items aren’t imported. Neither are records whose attachment has since been deleted.

WP-CLI

wp stowaway status
Shows what’s set up (bucket, delivery, where the keys come from) and how many attachments are offloaded.
wp stowaway offload --all
Offloads every attachment that isn’t in the bucket yet. To pick specific ones, name them: wp stowaway offload 123 124. Only files the bucket doesn’t have are uploaded. On a copy of the site, it refuses and says why.
wp stowaway import-wpom [--skip-settings]
Imports from WP Offload Media. It’s safe to run more than once. --skip-settings imports just the offload records, without the bucket and delivery settings.
wp stowaway download --all
Runs Bring it all home, downloading every file the server is missing from the bucket. Turn off Remove local copies first.
wp stowaway remove-local --all
Removes local copies of media that’s safely in the bucket. It only works with Remove local copies on and media coming from CloudFront.
wp stowaway health
Checks right now that images load from CloudFront, just like the hourly check.

For developers

stowaway_object_headers

Filters the headers stored with each object as it’s uploaded. By default that’s Content-Type plus a Cache-Control header. The cache time is one year (immutable) with Give each upload its own folder on, or one day with it off.

add_filter( 'stowaway_object_headers', function ( $headers, $name, $attachment_id ) {
    // Offer PDFs as downloads rather than opening them in the browser.
    if ( 'pdf' === strtolower( pathinfo( $name, PATHINFO_EXTENSION ) ) ) {
        $headers['Content-Disposition'] = 'attachment';
    }
    return $headers;
}, 10, 3 );

stowaway_s3_url

Filters the S3 API URL of the bucket or an object. Use it to send requests through an S3 VPC or FIPS endpoint. Or point Stowaway at a local S3-compatible emulator for tests. The path must stay URI-encoded.

add_filter( 'stowaway_s3_url', function ( $url, $key, $bucket, $region ) {
    // A local S3 emulator, path-style.
    return 'http://localhost:9000/' . $bucket . ( '' !== $key ? '/' . $key : '' );
}, 10, 4 );

stowaway_purge_caches

Fires when Stowaway switches media between CloudFront and your server during an outage. It runs after Stowaway has cleared the page caches it knows about. Hook it to empty any other cache holding the old image URLs.

add_action( 'stowaway_purge_caches', function () {
    // Empty a cache Stowaway doesn't know about.
    my_cache_flush_all();
} );

Stowaway signs requests itself with AWS Signature Version 4 and sends them with wp_remote_request(). The secret key is never sent.

What it costs

Stowaway is free. AWS bills your account for what your media uses:

  • S3 charges for storage and for requests to upload, read and delete files. Each image is stored in every size WordPress makes.
  • CloudFront charges for delivering media to visitors. You pay as you go for data and requests, or pick a flat-rate monthly plan.

Prices change and vary by region, so check AWS’s own pages for S3 pricing and CloudFront pricing. Set a budget alert in AWS Billing and you’ll hear about a surprising bill before it arrives.

Deactivating and removing

Removed local copies? Turn that off first. Then use Bring it all home (or wp stowaway download --all) to get every file back on your server.

Deactivating sends your site straight back to serving media from your own server. Your posts kept their local URLs all along, and the local copies are still there. So there’s nothing to fix.

Deleting the plugin also removes its settings and its table of offload records. It leaves the files in your bucket alone, and anything WP Offload Media left behind.

Staging copies and clones

Stowaway remembers the site address the bucket was set up from. Sometimes it finds itself at a different address, like a host’s staging copy or a cloned site. Then it keeps serving media as before, but pauses uploading to and deleting from the bucket. Otherwise, deleting a test image on the copy would delete the real site’s file.

A notice on every admin screen explains what happened and gives you two choices:

Stowaway's notice on a staging copy: uploads and deletes paused, with buttons to resume or use a different bucket.
The notice on a staging copy.
The site moved: resume
This is the real site at its new address. Uploads and deletes start again.
Use a different bucket
This is a copy that should have its own media. Give it its own bucket (and key) in step 1.

Or leave it paused. The staging copy then shows the real site’s media but can’t change it. New uploads on the copy stay on the copy’s server. wp stowaway offload refuses, with the same explanation.

Moving to https doesn’t count as a different address. Neither does adding or dropping www.. A different domain, port or folder does.

Troubleshooting

Some images still load from my server
Your theme or page builder is printing them outside the post content. Under Advanced, turn on Catch images anywhere on the page (it needs WordPress 6.9 or later). Then clear any page cache. A Divi site’s header logo is a common case. Divi saves the logo as a plain URL in its theme options and prints it straight into the header. Only this setting catches it, so Divi sites usually want it on. Images that aren’t in the Media Library at all (like a plugin’s own cache folder) aren’t Stowaway’s to move.
“There is no bucket named …” during setup
The name in step 1 doesn’t match any bucket. Bucket names have to be exact, so compare it with the S3 console letter by letter.
“AWS accepted the access key, but it is not allowed to use the bucket”
The policy isn’t attached to the user, or it names another bucket. Open the user in IAM and check Permissions. Then compare the bucket name in the policy’s two Resource lines.
“Reach the bucket” fails with Access Denied
Either the key’s policy is missing s3:ListBucket on the bucket itself (the ARN without /*), or it names a different bucket.
“Load it through CloudFront” gets a 403
CloudFront can’t read the bucket. Check three things:
  • the distribution’s origin is this bucket;
  • it uses origin access control;
  • the bucket’s Permissions → Bucket policy allows the distribution. CloudFront normally adds this itself.

Your old media loads, but the test file doesn’t. This is common after moving from WP Offload Media. Some of its setups make every file public, and the distribution reads the bucket as an anonymous visitor, with no origin access control. That works for public files only. Stowaway uploads files private, so CloudFront gets a 403 for every new upload. On a site that imported from WP Offload Media, the connection test checks for this, and says so when it’s the cause.

To fix it, give the distribution origin access control. Existing media keeps loading the whole time.

  1. In CloudFront, open the distribution, then Origins. Select the bucket’s origin and choose Edit.
  2. Under Origin access, choose Origin access control settings. Then Create new OAC, keep its defaults and save the origin.
  3. CloudFront shows a bucket policy to copy. Paste it into the bucket’s Permissions → Bucket policy. If the bucket already has a policy, add CloudFront’s statement to it instead of replacing it.
  4. Wait for the distribution to finish deploying, then run Test Connection again.

Don’t turn on “ACLs disabled (bucket owner enforced)” or “Block all public access” before origin access control works. Either one switches off the public file permissions your old media depends on, and every old image breaks. Once the test passes, both are safe, and they make the bucket properly private. That step is optional.

“Load it through CloudFront”: … does not exist in DNS
The domain doesn’t resolve, so visitors’ browsers can’t find it. If it’s your own domain, it needs a DNS record pointing at the distribution. In Route 53 that’s an alias A record, which CloudFront can add for you. Elsewhere it’s a CNAME to the d….cloudfront.net domain. New records can take a few minutes to work. Until then, use the cloudfront.net domain. Also check you didn’t make a media record to validate the certificate. See Using your own domain.
Images won’t load right after pointing my own domain at CloudFront
If media.example.com fails on one network but works elsewhere (on a phone over cellular, say), that network’s DNS cached a “no such domain” answer from before the record existed. It clears on its own, but that can take up to an hour. Restarting the router usually clears it at once. To check the record itself, ask a public resolver with dig @1.1.1.1 media.example.com.
Route 53: “RRSet of type A … is not permitted because a conflicting RRSet of type CNAME with the same DNS name already exists”
CloudFront tried to add its alias record for your subdomain, but a CNAME with the same name is already there. Usually it was made by mistake while validating the certificate. Delete that CNAME in Route 53, then let CloudFront set up the routing again. Keep the certificate’s own record, the one starting with an underscore.
“Load it from S3” gets a 403
The CloudFront domain is blank, so Stowaway is trying S3 directly. The bucket blocks public access, as it should. Add a CloudFront domain, or turn Serve media from CloudFront off until you do. Otherwise visitors would see broken images.
An upload didn’t reach the bucket
The Offload column says why. Its Offload now link tries again. If the connection test fails too, it usually points to the same cause.
A replaced image still shows the old version
With Give each upload its own folder off, the new file has the old URL. CloudFront keeps its cached copy until it expires, which takes a day by default. Turn the setting on for new uploads, or create an invalidation in CloudFront.
“This file is too large to upload within PHP’s memory limit”
Stowaway skipped one large file (often a video) rather than fail the whole upload. Raise PHP’s memory_limit, or ask your host to. Then use Offload now on the file. Until then it’s served from your server.
“Stowaway has paused uploading to and deleting from your S3 bucket”
The site’s address changed since the bucket was set up. See Staging copies and clones.
“Images aren’t loading from AWS” email, or a red notice in the admin
The hourly check failed twice. The Safety tab shows why. Check your AWS bill first, because a suspended account stops CloudFront. Then check the distribution and your domain’s DNS. Stowaway switches back by itself once images load again. Check Now speeds that up.
“Uploads to AWS are failing” email
AWS refused an upload. Usually the access key was deleted or deactivated, or the account is suspended. Run Test Connection to see which. New uploads stay on your server in the meantime. Once it’s fixed, Offload Existing Media picks them up.
Does it work on Multisite?
It hasn’t been tested on Multisite yet.

Still stuck? Run Test Connection and copy the system report from the plugin’s Support tab. Then send both to us.

Privacy and AWS

Stowaway connects your site to Amazon Web Services, using your own AWS account. Nothing is sent anywhere until you enter your keys.

  • Amazon S3 stores your media. Your site sends it:
    • each file, in every size;
    • deletion requests when you delete files;
    • bucket lookups during setup;
    • a small test file, which is deleted again.
  • Amazon CloudFront, if you use it, delivers the media. Visitors’ browsers load files from it. So it receives what any web server does: their IP address, browser details and the address of the file.
  • Your site also loads files from CloudFront itself:
    • the test file, during a connection test;
    • a few images once an hour, while outage monitoring is on (you can turn it off on the Safety tab);
    • files the server is missing, for Bring it all home or when you edit an image whose local copy was removed.

Outage and upload alerts go out through your site’s own email, to the address you choose. They don’t pass through any other service.

Stowaway sends nothing to us. It has no tracking and no analytics. See the AWS Service Terms and AWS Privacy Notice.