| 开发者 |
masoudin
wpfitter bahreynipour teledark |
|---|---|
| 更新时间 | 2026年9月9日 19:21 |
| 捐献地址: | 去捐款 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
wp advmo offload) for unlimited, scriptable migrations. (Learn more)wp media regenerate and the Regenerate Thumbnails plugin; regenerated thumbnails offload automatically. Full Cloud Migration temporarily restores the cloud source, regenerates it, and safely removes the local working files afterward.add_filter('advmo_should_offload_attachment', function($should_offload, $attachment_id) { $file = get_attached_file($attachment_id); if ($file && filesize($file) > 5 * 1024 * 1024) { return false; } return $should_offload; }, 10, 2);
View Developer Hooks Documentation →
Under the hood, the plugin uses the official AWS SDK for PHP, namespace-isolated with PHP-Scoper so it never conflicts with other plugins that bundle the same SDK.
Pro version coming soon
We're working on Advanced Media Offloader Pro with premium features such as private media files with secure, authenticated access. Follow wpfitter.com to be the first to know when it launches.
/wp-content/plugins/advanced-media-offloader/.wp-config.php using the examples below. Constants take priority over credentials saved in the admin and lock the corresponding fields. This keeps secrets out of the database — useful for version-controlled or multi-environment setups.
Note: Domain and endpoint URLs will automatically be prefixed with https:// if you don't include it, but we recommend always including the full URL for clarity.
Amazon S3 Configuration
define('ADVMO_AWS_KEY', 'your-access-key'); define('ADVMO_AWS_SECRET', 'your-secret-key'); define('ADVMO_AWS_BUCKET', 'your-bucket-name'); define('ADVMO_AWS_REGION', 'your-bucket-region'); define('ADVMO_AWS_DOMAIN', 'your-domain-url');
Cloudflare R2 Configuration
define('ADVMO_CLOUDFLARE_R2_KEY', 'your-access-key'); define('ADVMO_CLOUDFLARE_R2_SECRET', 'your-secret-key'); define('ADVMO_CLOUDFLARE_R2_BUCKET', 'your-bucket-name'); define('ADVMO_CLOUDFLARE_R2_DOMAIN', 'your-domain-url'); define('ADVMO_CLOUDFLARE_R2_ENDPOINT', 'your-endpoint-url');
DigitalOcean Spaces Configuration
define('ADVMO_DOS_KEY', 'your-access-key'); define('ADVMO_DOS_SECRET', 'your-secret-key'); define('ADVMO_DOS_BUCKET', 'your-bucket-name'); define('ADVMO_DOS_DOMAIN', 'your-domain-url'); define('ADVMO_DOS_ENDPOINT', 'your-endpoint-url');
Backblaze B2 Configuration
define('ADVMO_BACKBLAZE_B2_KEY', 'your-application-key-id'); define('ADVMO_BACKBLAZE_B2_SECRET', 'your-application-key'); define('ADVMO_BACKBLAZE_B2_BUCKET', 'your-bucket-name'); define('ADVMO_BACKBLAZE_B2_REGION', 'your-bucket-region'); define('ADVMO_BACKBLAZE_B2_DOMAIN', 'your-domain-url'); define('ADVMO_BACKBLAZE_B2_ENDPOINT', 'your-endpoint-url');
Wasabi Configuration
define('ADVMO_WASABI_KEY', 'your-access-key'); define('ADVMO_WASABI_SECRET', 'your-secret-key'); define('ADVMO_WASABI_BUCKET', 'your-bucket-name'); define('ADVMO_WASABI_REGION', 'your-bucket-region'); define('ADVMO_WASABI_DOMAIN', 'your-domain-url');
MinIO Configuration
Use this for any storage that supports the S3 API via a custom endpoint (e.g., MinIO, OVHcloud Object Storage, Scaleway, Linode, Vultr, IBM COS). Select this if your provider isn't listed separately.
define('ADVMO_MINIO_KEY', 'your-access-key'); define('ADVMO_MINIO_SECRET', 'your-secret-key'); define('ADVMO_MINIO_BUCKET', 'your-bucket-name'); define('ADVMO_MINIO_DOMAIN', 'your-domain-url'); define('ADVMO_MINIO_ENDPOINT', 'your-endpoint-url'); define('ADVMO_MINIO_PATH_STYLE_ENDPOINT', false); // Optional. Set to true if your MinIO server requires path-style URLs (most self-hosted MinIO setups). Default is false. define('ADVMO_MINIO_REGION', 'your-bucket-region'); // Optional. Set your MinIO bucket region if needed. Default is 'us-east-1'.Yes. Everything described here — automatic offloading, bulk migration, WP-CLI, all six providers — is completely free. A Pro version with extras such as private media files is in the works.
Amazon S3, Cloudflare R2, DigitalOcean Spaces, Backblaze B2, Wasabi, and MinIO — plus any other S3-compatible service (OVHcloud, Scaleway, Linode, Vultr, IBM COS, and more) via the MinIO option. Additional providers are added based on user demand.
Nothing, until you say so. Existing files stay untouched until you run the bulk offload from the Media Overview page (or via WP-CLI). New uploads are offloaded automatically based on your settings.
Serving media from cloud storage takes load off your web server, and pairing your bucket with a CDN delivers files from locations close to your visitors. Media-heavy sites usually see the biggest improvement.
Yes. URL rewriting hooks into WordPress core media functions (wp_get_attachment_url and related filters), so WooCommerce, Elementor, Beaver Builder, and most themes and plugins work without any changes.
Yes — that's the default. You can choose between three retention policies: Retain Local Files (keep everything), Smart Local Cleanup (free up space but keep originals as backup), or Full Cloud Migration (remove all local copies).
The browser-based bulk offload processes up to 50 files (max 150 MB) per batch — simply run it again for the next batch. For large libraries, the WP-CLI command wp advmo offload has no limit and supports options like --limit and --skip-failed.
If you use the "Retain Local Files" policy, yes — deactivate the plugin and your media is served locally again. With Full Cloud Migration you would need to re-download your files first, so keep local copies until you're confident.
All generated image sizes are offloaded alongside the original, and URL rewriting covers every size and srcset attribute — responsive images keep working as expected.
Yes — Modern Image Formats (recommended), Imagify, and EWWW Image Optimizer are fully supported. Optimized WebP and AVIF versions are offloaded automatically alongside the originals.
Not yet — the free version supports publicly accessible files. Private media with secure, authenticated access is planned for the upcoming Pro version.
With Mirror Delete enabled, the corresponding cloud files are removed automatically. Otherwise, files remain in cloud storage, potentially creating orphaned objects.
For optimal performance:
By default, the plugin sets a public-read ACL on uploaded objects. However, some providers don't support ACLs, and AWS S3 has ACLs disabled by default on new buckets since April 2023. You should configure bucket-level public access using your provider's bucket policies.
If you encounter AccessControlListNotSupported errors or need to disable ACLs, add the following code to your theme's functions.php or a custom plugin:
add_filter('advmo_object_acl', '__return_false');
Check the Media Overview page — it shows offload errors and lets you download a CSV of failed attachments. The plugin also logs errors to attachment metadata, and you can enable WordPress debug logging for more detail.
wp advmo offload now starts only when that command runs, so command discovery and other WP-CLI operations remain safe when the plugin is not configured..svg extension, preventing failures in WordPress and page builders that require a real local file.wp-config.php snippet sits under the credential fields for anyone who prefers to keep credentials out of the database.Aws\S3\Exception\S3Exception class name.advmo_check_stalled_processes) no longer runs every 15 minutes when idle. It is now scheduled only while a bulk offload job is active and cleared when the job completes, is cancelled, or recovers from a stall.advmo_bulk_offload_media_process_cron) could remain scheduled after a successful bulk offload. It is now cleared reliably when the job finishes or the queue is empty././ to its URL — for example https://cdn.example.com/./image.png — so the image failed to load on some CDNs. The URL is now correct.advmo_object_acl filter to customize or disable object-level ACL permissionswp-config.php constants (e.g. define('ADVMO_MINIO_PATH_STYLE_ENDPOINT', true);).wp media regenerate command and the Regenerate Thumbnails plugin. Regenerated thumbnails now automatically offload to cloud storage. Note: This feature does not work with Full Cloud Migration retention policy.changelog.txt included with the plugin.