| 开发者 | bsidesolution |
|---|---|
| 更新时间 | 2026年11月3日 07:10 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
srcset images, images in post content and page-builder shortcodes, and Yoast SEO's share images and schema.wp stowaway offload --all.wp-config.php instead of the database.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
wp stowaway status: what is configured, and how much is offloaded.wp stowaway offload --all: offload everything not yet in the bucket (or wp stowaway offload 12 34 for specific attachments).wp stowaway import-wpom: import from WP Offload Media.wp stowaway download --all: bring every missing file back from the bucket.wp stowaway remove-local --all: remove local copies that are safely in the bucket (with Remove local copies on).wp stowaway health: check now that images load from CloudFront.wp-config.php instead:
define( 'STOWAWAY_ACCESS_KEY_ID', 'your-access-key-id' );
define( 'STOWAWAY_SECRET_ACCESS_KEY', 'your-secret-access-key' );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.
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.
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.
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.
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.
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.
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.
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.
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.
No. Stowaway is for Amazon S3 and CloudFront only.
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.
It hasn't been tested on Multisite yet.
wp stowaway download --all.