S3 Media Sync
- Activate plugin
- Create an IAM user with Programmatic Access
- Enter the provided AWS S3 API keys on the Settings page
- Backfill the uploads directory on AWS by running the following command:
wp s3-media upload-all --url=example-site.com
How can I upload media to a subdirectory in S3?
Let’s say you have a bucket named
my-awesome-site, but you want all your media to go into the
preprod subdirectory. On the S3 Media Sync settings page, you would enter the following for the
S3 Bucket Name field:
Then, all media will automatically be kept in-sync within
How can I ensure all the attachments were uploaded?
You can see which attachments were skipped by running the following command:
wp vip migration validate-attachments invalid-attachments.csv --url=example-site.com
The log is then available at
invalid-attachments.csv. The full command can be found here:
- Update Composer dependencies for PHP 8.0 compatibility.
- Fix: Upload images edited within WordPress to the bucket.