Linux 软件免费装
Banner图

Stowaway – Offload Media to Amazon S3 & CloudFront

开发者 bsidesolution
更新时间 2026年11月3日 07:10
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

media cdn s3 cloudfront offload

下载

1.0.0 1.0.1 1.0.2

详情介绍:

Stowaway copies your uploads to your own Amazon S3 bucket and serves them to visitors through Amazon CloudFront (or straight from S3). Your server stops serving images, your pages load media from a CDN close to each visitor, and nothing about how you use the Media Library changes. It does one thing, AWS, and does not try to support every storage provider. Every feature is free: there is no "Pro" version. What it does Set up in three steps A setup wizard walks you through it, starting from an empty AWS account. Each step explains what to make in the AWS console and links to a full guide with screenshots:
  1. Bucket: create one with the settings that matter, and give Stowaway its name.
  2. Access key: an AWS user just for your site, with a policy that lets it use that one bucket and nothing else. Stowaway checks the key with AWS, finds the bucket's region, and makes sure the key can use it. Keys can live in wp-config.php instead of the database.
  3. CloudFront: put a distribution in front of the bucket and paste its domain. Or skip it for now: media keeps being served from your server, and new uploads are copied to the bucket for when you're ready.
Finishing runs a connection test that walks the whole path a real upload takes: it reaches the bucket, uploads a small file, loads it the way a visitor's browser would, and deletes it. Coming from WP Offload Media? Stowaway reads the settings and offload records WP Offload Media (Lite or Pro) left in your database, so media you offloaded with it keeps its exact URLs, with nothing uploaded again. It even uses the access keys already in your wp-config.php until you replace them. Deactivate WP Offload Media, then choose Import from WP Offload Media on Settings → Stowaway. Some WP Offload Media setups make every file public and let CloudFront read them as an anonymous visitor. Stowaway's uploads are private, so on those setups CloudFront also needs Origin Access Control, or new uploads won't load. The connection test tells you if that's the case, and what to change in CloudFront. Media you already offloaded keeps working either way. WP-CLI

安装:

  1. Install and activate Stowaway from Plugins → Add New.
  2. Go to Settings → Stowaway and follow the setup wizard.
  3. To copy media you uploaded before installing Stowaway, use Offload Existing Media on the same screen.
You need an AWS account. The wizard walks you through creating the bucket, the access key and the CloudFront distribution; the full guide, with screenshots, is at bsidesolution.com/stowaway/docs. To keep your access keys out of the database (and out of database backups), add them to wp-config.php instead: define( 'STOWAWAY_ACCESS_KEY_ID', 'your-access-key-id' ); define( 'STOWAWAY_SECRET_ACCESS_KEY', 'your-secret-access-key' );

屏幕截图:

  • An access key that can use that one bucket, with the policy ready to paste.
  • CloudFront in front of the bucket, so it stays private.
  • Settings, after a passing connection test.
  • Each file's offload status in the Media Library.
  • Offloading media that was uploaded before Stowaway was set up.
  • The Safety tab: outage monitoring, failover, alerts, and local copies.

常见问题:

Which AWS permissions does Stowaway need?

s3:ListBucket on the bucket, and s3:PutObject and s3:DeleteObject on the objects in it, and nothing else. The setup wizard shows the policy with your bucket's name already in it, ready to paste into AWS.

Do I need CloudFront?

No. Without it, media is served straight from S3, which only works if the bucket allows public reads. With CloudFront the bucket can stay private, and visitors get media from a server near them.

Does Stowaway delete files from my server?

Not unless you ask it to. By default your uploads stay on your server as well as in the bucket. To save disk space, turn on Remove local copies on the Safety tab: each file's local copy is then deleted once it loads from CloudFront. That trades away the safety net: during an AWS outage, images only in the bucket can't fall back to your server.

What happens if AWS goes down?

With monitoring on (the default), Stowaway loads a few of your images through CloudFront every hour. After two failed checks in a row, your site serves images from its own copies, page caches are cleared, and you get an email. When CloudFront works again, Stowaway switches back and emails you again. It also emails you (at most once a day) if AWS starts refusing uploads.

How do I stop using Stowaway?

If you removed local copies, first turn that off and use Bring it all home on the Safety tab (or wp stowaway download --all) to download every file back. Then deactivate Stowaway: posts store local URLs the whole time, so your site carries on serving media from your server.

What happens if I deactivate or delete Stowaway?

Your site goes back to serving media from your server. Posts store local media URLs the whole time, so nothing needs fixing, as long as the files are on your server (see "How do I stop using Stowaway?"). Files in the bucket are left alone.

Some images still load from my server. Why?

Stowaway rewrites media URLs in post content and wherever WordPress builds image URLs. Some themes and page builders print images elsewhere (Divi's background images, for example). Turn on Catch images anywhere on the page, under Advanced in Settings → Stowaway, to catch those too. It needs WordPress 6.9 or later; on older versions the setting does nothing.

Will offloading change my image URLs?

Media you offload with Stowaway gets new URLs on your CloudFront domain, and posts keep pointing at it automatically. Media imported from WP Offload Media keeps the exact URLs it already had.

What about staging copies of my site?

Stowaway remembers which site the bucket was set up from. On a copy of the site (a staging site, or a clone) it keeps serving media as before, but stops uploading to and deleting from the bucket, so the copy can't overwrite or delete the real site's media. If the site really moved to a new address, one click resumes. Or give the copy its own bucket.

Does it support other storage providers?

No. Stowaway is for Amazon S3 and CloudFront only.

Where do I get help?

Send a support request from Stowaway's website. Settings → Stowaway → Support has a system report to paste into it. The documentation covers setup step by step, and troubleshooting.

Does it work on Multisite?

It hasn't been tested on Multisite yet.

更新日志:

1.0.2 1.0.1 1.0.0