Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › Amazon S3

How to Connect WordPress to Amazon S3 for Media Storage

By Freedom251 Team · · 12 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The standard way to connect WordPress to Amazon S3 is to use an offload plugin as the integration layer. Install WP Offload Media Lite, give it narrowly scoped AWS permissions, connect it to an S3 bucket, and test a new upload before changing how URLs are delivered or deleting local files. S3 then stores the media objects; direct S3 URLs or an optional CloudFront distribution can deliver them to visitors.

New uploads and migration of files already in the Media Library are separate jobs. The free plugin handles newly uploaded media, while the plugin’s Pro upgrade adds a tool for uploading existing Media Library files. Treat removal of local copies as a later, reversible change—not as part of the initial connection.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the WordPress–S3 connection actually does

WordPress does not provide a single core setting that turns the Media Library into an S3-backed store. In the documented workflow, a plugin watches the WordPress media uploader, copies each attachment to Amazon S3, and can rewrite the public media URL to an S3 or CDN address. The WordPress.org description says the plugin automatically copies images, videos, documents and other media added through WordPress’ media uploader to supported object storage.

That creates three separate layers:

  • WordPress: records the attachment, metadata and relationships used by posts and pages.
  • Amazon S3: stores the object files and serves them when a direct S3 URL is used.
  • CloudFront (optional): caches and delivers those objects through a distribution, which can improve geographic delivery and provide a custom delivery hostname when configured.

Moving storage does not automatically move every existing file. A newly uploaded image can be offloaded while older uploads remain on the web server until you run a separate migration. That distinction is important for disk planning, rollback and any decision to remove local copies.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Before you begin: requirements and decisions

Access you need

  • A working WordPress site and administrator access to install a plugin and change its settings.
  • Access to the AWS account or to an administrator who can create or select an S3 bucket and grant the required permissions.
  • Permission to edit wp-config.php if you use access keys. Some hosts instead provide an instance or service role, which avoids putting long-lived keys in the file.
  • A backup and a tested restore path before changing storage or deleting local files.

The AWS walkthrough is written for WordPress on Lightsail. Other hosts may expose different options for filesystem access, instance roles or service credentials, so the labels and credential choices in your environment can differ.

Choose the credential method first

Prefer an IAM role or another short-lived credential mechanism when your host supports it. If the environment cannot provide that path, the documented fallback is an IAM user with an access key and secret key. Those are long-lived programmatic credentials. AWS warns that this approach creates a security risk, so limit the permissions to the target bucket, protect the configuration file and remove the user when it is no longer required.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Credential choice Security exposure Operational considerations
IAM role or equivalent short-lived credentials Lower exposure because there is no long-lived key copied into the site configuration. Requires host support and correct role assignment; the exact setup varies by provider.
IAM user access keys Higher exposure because the keys remain valid until rotated or disabled. Works where roles are unavailable, but requires a narrowly scoped policy, secret handling and lifecycle cleanup.

Decide how visitors will receive files

Delivery path What it means When it fits
Direct S3 URL WordPress rewrites the media URL to the S3 object address. A simple first deployment or a site that does not need a separate caching layer.
CloudFront URL CloudFront sits in front of S3 and serves cached copies through a distribution. When global caching, a custom delivery hostname or a dedicated CDN layer justifies the added AWS configuration.
Keep the existing local URL initially Objects are copied to S3, but you postpone public URL replacement while validating the setup. A cautious rollout that separates storage validation from delivery changes.

CloudFront is optional. S3 remains the storage system; CloudFront is a cache and delivery layer. Adding it introduces another component to configure and troubleshoot, so do not treat it as a prerequisite for testing S3 offload.

Step 1: install and open the offload settings

  1. Sign in to WordPress with an administrator account.
  2. Open the plugin installer and search for WP Offload Media Lite.
  3. Install and activate the plugin.
  4. Go to Settings > Offload Media.
  5. Choose Amazon S3 as the storage provider.
  6. Select the credential method offered by your hosting environment. Choose a role or short-lived option when available; otherwise prepare the restricted IAM user described below.

The plugin needs AWS access to create or use the bucket and upload website images and attachments. Do not continue with broad, unrelated AWS permissions simply to make the first connection work.

Step 2: create a least-privilege IAM policy and user when needed

Limit the policy to one bucket

Create a policy for the bucket that will hold this site’s media. AWS’s example grants the S3 actions needed for bucket and object operations; adapt that example so the resource is the specific bucket and its objects rather than all buckets in the account. The plugin may need to list or inspect the bucket, write uploaded objects and read them for delivery. If your chosen workflow includes replacing or deleting objects, grant only the corresponding object action and only where it is required.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

Keep administrative actions outside this user. A media-offload identity should not be able to manage unrelated AWS services, billing, users or every bucket in the account. Record the bucket name and region alongside the policy so a later administrator can identify what the identity is allowed to touch.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Create the user only if a role is unavailable

  1. In the AWS identity and access controls, create a dedicated IAM user for this WordPress installation.
  2. Attach the bucket-limited policy to that user.
  3. Create an access key only for the documented programmatic-access path.
  4. Copy the key values through a protected administrative channel; do not place them in a post, theme file or support ticket.
  5. Plan rotation and deletion. Disable or remove the user when the site moves to a role, changes bucket, or no longer needs direct access.

A key that works is not proof that the policy is appropriately scoped. Check the policy resource and actions before placing credentials on the site.

Step 3: add access values to wp-config.php safely

When access keys are the only supported method, the AWS procedure places the values in wp-config.php above WordPress’ “stop editing” comment. Use the credential constants or configuration format required by the installed plugin version; do not invent alternate names. Keep the file outside public downloads, restrict who can read it on the server, and never commit the key values to a public source-control repository.

  1. Make a backup of wp-config.php and note how to restore it.
  2. Insert the plugin’s documented access-key settings above the stop-editing comment.
  3. Save the file with the same ownership and permissions expected by your host.
  4. If the host requires a service restart after configuration changes, restart it during a maintenance window.
  5. Return to Settings > Offload Media and let the plugin test or use the credentials.

If the connection fails, remove any partially entered secrets from logs or copied support output, then check the policy resource, bucket region, file syntax and host role settings before creating another key.

Step 4: create or select the S3 bucket

  1. From the offload settings, choose the option to create a new bucket or browse existing buckets.
  2. Select the bucket intended only for this site’s media, or use a clearly separated prefix if an approved shared-bucket design is required.
  3. Choose the region. AWS recommends using the same region as the WordPress instance in its Lightsail procedure.
  4. Save the bucket selection and let the plugin complete its connection setup.

Write down the bucket name and region. A mismatch between the bucket policy, selected region and plugin configuration is a common reason for failed uploads or inaccessible objects. Keep the bucket identity in your deployment notes so a restore or host migration does not depend on one administrator’s memory.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord | 6.35mm Jack, Durable Design, Stage and Home Studio Use, Low Noise Shielded Electric Cord for Bass, Keyboard, Amp, Mixer
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

Step 5: configure URL delivery and HTTPS

The plugin can replace media URLs with an S3 URL, a CloudFront URL or another configured CDN URL. Choose the simplest path that meets the site’s requirements:

  • Use direct S3 delivery while you are proving that objects upload and render correctly.
  • Add CloudFront when you need a cache and global delivery layer, or when the site’s chosen architecture requires a custom distribution hostname.
  • If you use a custom domain, complete the distribution and certificate configuration before making that hostname the site-wide media URL.

Keep delivery changes separate from storage validation. Upload and render a test object over HTTPS first. If the browser still requests an old local path, inspect the plugin’s delivery setting and the attachment URL rather than deleting files or changing DNS prematurely.

Step 6: validate with new media before touching existing files

The sources describe the connection workflow but do not define a universal test checklist. Use the following operational validation for your own site:

  1. Upload a small image through the normal WordPress Media Library uploader.
  2. Upload a document that the site commonly links to.
  3. If the site publishes video, upload a representative video file only after confirming that the bucket and host can handle the file size and request duration.
  4. Open the bucket and confirm that each object appears under the expected key or folder structure.
  5. Open the attachment and a page that embeds it. Confirm the rendered URL is the intended S3 or CloudFront HTTPS URL.
  6. Test the object in a private browser window and from a second network if practical, so a cached administrator session does not hide an access problem.
  7. Check the WordPress Media Library record, the page source and the browser’s failed-request details if an object does not render.

Do not enable local-file removal, bulk migration or aggressive cache changes until this basic path works for the media types your site actually publishes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

New uploads versus an existing Media Library migration

New uploads

In the free plugin workflow, newly uploaded media is the straightforward case: the uploader creates the WordPress attachment, the plugin copies the file to S3 and the configured delivery setting can rewrite its URL. This is suitable for a gradual rollout in which new content uses S3 while older content remains local.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Existing files

Existing Media Library files require a migration step. The WordPress.org listing states that the free plugin handles newly uploaded files, while the Pro upgrade adds an upload tool for existing Media Library files. Treat that upgrade as a migration capability, not as evidence that every old object has already been copied.

  1. Inventory the existing library and identify the bucket and prefix where migrated objects should live.
  2. Back up the database and local uploads before starting.
  3. Run the available existing-media upload tool in manageable batches if the site’s tooling provides batching.
  4. Check representative older posts, galleries, downloadable documents and responsive image sizes after each batch.
  5. Record failures and retry them before changing URL delivery or deleting local files.
  6. Keep the local originals until restore testing and URL verification are complete.

Migration can expose references outside WordPress attachment metadata, such as hard-coded URLs in custom fields, templates or exported content. Search and update those references only with a method that preserves a rollback, and verify the affected pages afterward.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Should you remove local uploads after S3 offload?

Removing local files saves disk space but removes the easiest recovery copy. The plugin exposes a Remove Files From Server setting in the bucket-and-distribution workflow. AWS documents the setting but does not promise that deletion is safe for every hosting or backup arrangement.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep local copies when

  • Your backup process does not include S3 objects, or restores have not been tested.
  • The migration is incomplete or some posts still reference local paths.
  • You are still changing the delivery hostname or CloudFront configuration.
  • The site has irregular media types, custom integrations or compliance requirements that need a local fallback.

Consider removal only after these checks

  1. Confirm every required object exists in the bucket, including generated image sizes and downloadable files.
  2. Open representative URLs through the final delivery path over HTTPS.
  3. Perform a restore rehearsal from your backup system and verify that both the database records and media can be recovered.
  4. Confirm that your backup policy covers the S3 objects or provides an independent copy.
  5. Take a final pre-deletion backup and document how to turn local retention back on.
  6. Enable removal, then monitor new uploads and edited posts rather than assuming the setting is harmless.

Disk savings are not a substitute for a recovery plan. If S3 access, a policy or a distribution fails, local files can be the fastest way to restore normal publishing.

Direct S3 delivery or CloudFront?

Question Direct S3 CloudFront in front of S3
Storage S3 stores and serves the objects. S3 still stores the objects; CloudFront caches and delivers them.
Configuration Fewer components and a simpler first test. Requires a distribution and its associated cache and domain configuration.
Caching Uses S3 delivery behavior without a separate edge-cache layer. Adds edge caching, which can help repeated requests from geographically distributed visitors.
Custom domain Depends on the URL arrangement you choose. Useful when the site needs a dedicated CDN hostname and the required HTTPS configuration.
Best rollout point Initial validation and smaller, simpler deployments. After the S3 upload path works and the site benefits from a separate delivery layer.

The cited material provides no universal speed, storage-price or bandwidth benchmark. Performance and cost depend on traffic, object sizes, cache behavior, region and request patterns, so do not promise a fixed improvement from adding CloudFront.

Common failure modes and fixes

The plugin cannot list buckets

Check whether the credential method is the one your host supports, whether the IAM policy allows the required bucket operation, and whether the policy points to the correct account and bucket. If you used an access key, verify that the key is active and that the configuration file contains the intended values without syntax errors.

Uploads fail but the bucket is visible

Review object-write permissions and the bucket region selected in the plugin. Confirm that the user is restricted to the intended bucket but not so restricted that it lacks the upload action required by the plugin. Test with a small image before retrying a large video.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The object exists but the page shows a broken image

Inspect the URL generated by the attachment. Confirm that the host name, object key and HTTPS scheme are correct, then test the object directly in a private browser window. If you recently introduced CloudFront, check the distribution’s origin and the URL configured in the plugin before changing the bucket policy.

Old posts still request local paths

That usually indicates an incomplete existing-media migration or a hard-coded URL outside the attachment data. Finish the migration tool’s work, identify the remaining local references and update them with a reversible process. Do not remove local files while those references remain.

A key is exposed or no longer needed

Disable or delete the affected access key, create a replacement only after correcting the storage method or policy, update the site through a protected channel and review logs for unexpected use. Move to a role or short-lived credential path when the host supports it.

A safe rollout plan

  1. Stage: back up WordPress, confirm administrator and configuration-file access, and choose the bucket region.
  2. Restrict: create a bucket-limited policy and prefer a role; use a dedicated IAM user only when necessary.
  3. Connect: install WP Offload Media Lite, select Amazon S3 under Settings > Offload Media, and connect the bucket.
  4. Prove: upload representative new media, verify bucket objects and HTTPS rendering, and record the resulting URLs.
  5. Deliver: keep direct S3 delivery for the first validation or add CloudFront when its caching and distribution features are justified.
  6. Migrate: use the existing-media upload capability for older files, checking posts and downloads in batches.
  7. Recover: rehearse a restore and confirm S3 coverage in backups.
  8. Clean up: only then consider Remove Files From Server, with a documented rollback.

What this setup does—and does not—guarantee

Offloading reduces dependence on the WordPress server’s local disk and gives the site an object-storage delivery path. It does not by itself guarantee faster pages, lower bills, uninterrupted availability or a complete backup. Those outcomes depend on the bucket policy, region, cache configuration, traffic and backup design. The documented sources publish qualitative scalability, security and performance benefits, but no single benchmark applies to every WordPress installation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The durable design is therefore procedural: use the narrowest credentials available, separate new-upload handling from migration, validate URLs before deleting anything and keep a tested recovery path for both the database and media objects.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Amazon S3AWSCloudFrontMedia Librarywebsite operationsWordPress

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.