Get upto 20% off your purchase! Get Now

Amazon S3 22min Read

How to Upload WordPress Media Library to AWS S3

How to Upload WordPress Media Library to AWS S3

Uploading your WordPress media library to AWS S3 is one of the most effective ways to scale your website, reduce server storage, and improve page speed. While AWS S3 is a highly reliable cloud storage provider, configuring it correctly requires a secure S3 bucket, proper IAM user permissions, and an efficient offloading plugin like Next3 Offload.

In this guide, we walk you through the step-by-step process of connecting your WordPress media library to Amazon S3 and optimizing your setup for maximum cost efficiency.

As your website expands, handling large amounts of images, videos, and other uploads can put a strain on your hosting server. To avoid performance issues, moving those files to an external storage system like Amazon S3 is a good idea.

Amazon S3 is a cloud-based storage service known for its speed, flexibility, and reliability. By storing your media files on S3, you reduce the load on your WordPress hosting and improve your site’s speed and scalability.

In this article, we’ll guide you through linking your WordPress media library to AWS S3 using the Next3 Offload plugin. You’ll also learn how this setup can enhance your site’s performance and resource management.

AWS S3 vs. Cloudflare R2 vs. DigitalOcean Spaces: Which is Best?

Cloud Storage Provider Storage Cost (per GB) Egress Fees (Data Transfer Out) Best Use Case Next3 Offload Compatibility
Amazon S3 $0.023 High ($0.09/GB) Enterprise security & scale Yes (Native Integration)
Cloudflare R2 $0.015 Zero ($0.00) Cost-saving, high traffic Yes (S3-Compatible Integration)
DigitalOcean Spaces $0.020 1TB free, then $0.01/GB Developer-friendly, flat rate Yes (S3-Compatible Integration)

Pro Tip for Saving AWS S3 Costs:
Although Amazon S3 has higher egress fees (data transfer costs) compared to Cloudflare R2, you can easily bypass these fees. By using Next3 Offload to connect your AWS S3 bucket with a Content Delivery Network (CDN) like Amazon CloudFront or Cloudflare, your media files are cached globally. This means your visitors load media from the CDN for free, reducing your AWS S3 egress costs by up to 90%!

Let’s get started. 

What is Amazon S3?

Amazon S3, short for Simple Storage Service, is a cloud storage solution offered by Amazon Web Services (AWS). It’s built to help users securely store and access unlimited amounts of data from any location, whenever they need it.

Whether it’s images, videos, documents, backups, or system logs, Amazon S3 can handle all types of files. It offers a straightforward web interface that developers can use to upload, manage, and retrieve data seamlessly over the internet.

Which WordPress S3 Plugin Should You Use?

Choosing the right plugin to connect WordPress with Amazon S3 is important. You need something simple, reliable, and full of useful features. The plugin should match your needs and be easy to set up.

Let’s talk about the top 3 plugins that can upload WordPress media library to AWS S3 without any hassle. 

Next3 Offload: It is a great option for offloading media files. It connects your WordPress site with Amazon S3 and moves your media to the cloud. This helps free up space on your server and improves your website’s speed.

Wasabi Smart File Uploads: This plugin also supports Amazon S3. It allows you to upload your media files quickly from WordPress to the cloud. The plugin is simple and helps keep your files safe and organized.

UpdraftPlus: The plugin is known for backups. It can store your WordPress site backups on Amazon S3. While it is not focused only on media, it’s still helpful for saving your site data in the cloud.

Recommended: One popular plugin that meets all these criteria is the Next3 Offload media plugin. The plugin offers advanced features for managing media files on WordPress sites.

How to Upload WordPress Media Library to Amazon S3 using Next3 Offload?

You can offload your WordPress Media Library to AWS S3 using the Next3 Offload plugin. Follow these steps:

  1. Install the Next3 Offload plugin on your WordPress site.
  2. Choose Amazon S3 as your storage provider.
  3. Log in to your AWS Console.
  4. Create a new IAM User with proper permissions.
  5. Set public access permissions for your S3 bucket.
  6. Copy your Access Key and Secret Key from AWS.
  7. Add these keys to the Next3 Offload plugin settings.
  8. Configure your storage settings (bucket name, region, etc.).
  9. Set up delivery settings for serving media.
  10. Enable offload settings to move media files automatically.

Step #1: Install and activate Next3 Offload

To connect your WordPress media files with Amazon S3, you’ll need a reliable plugin that can handle the offloading process. This helps reduce the load on your server and improves your site’s speed and performance.

Before installing the plugin, you need to get and download the plugin from their official website. At that time, you will be provided the license for the activation of the plugin.

Start by logging in to your WordPress dashboard. From the left-hand menu, go to the Plugins section. 

Plugin installation

Select the Add New Plugin button to install the Next3 Offload plugin

Add new plugin

Now, you need to navigate to the Upload Plugin button.

Upload plugin

At this step, you’ll need to upload your file. Simply click on the Choose File button to open your device’s file browser.

Choose file

After selecting the file, look for the Install Now button on the screen.(You can follow this article to complete the installation process). 

Install Now

Once the installation is finished, you’ll see the option to activate the plugin. Click on the Activate Plugin button to enable it on your WordPress site.

Activate plugin

To start using the plugin, you need to activate your license first. Enter the license key you received into the provided field on the plugin settings page.

Then, click the Activate License button to complete the process and unlock all features.

Activate License

Once you complete the steps above, you can access the Next3 Offload dashboard from your WordPress admin panel.

Step #2: Select a Provider

Now it’s time to choose your storage provider. In this case, select Amazon S3 from the available options. This will begin the process of linking your WordPress site with your Amazon S3 account for media offloading.

Choose Amazon S3 provider

At this point, you’ll need to enter your Access Key and Secret Key to connect Amazon S3 with your WordPress site.

To get these keys, you must have an Amazon S3 account. If you don’t have one yet, you’ll need to create it first.

Follow the steps below to sign up or sign in to Amazon S3. This will guide you through setting up your AWS account and generating the required credentials.

Step #3: Logging in to the AWS Console

If you already have an Amazon Web Services (AWS) account, simply go to the AWS Sign-In page and log in using your email and password.

Once signed in, you’ll be able to access the AWS Management Console, where you can manage your S3 storage and create your Access and Secret Keys.

AWS Management Console

If you don’t have an account, you’ll need to create one before continuing. You will need to sign up.

Step #4: Create an IAM user

Once you’re logged into the AWS Management Console, the next step is to create a new IAM User.

There are two common ways to create an IAM User that you can follow. Both methods will help you generate the credentials needed to connect WordPress with Amazon S3 securely.

We’re following two methods for creating IAM User:

Method 1: 

In the User name field, type the name you want to assign to the new IAM user. Choose a name that’s easy to remember and related to its purpose.

Then, under AWS Credential Type, check the box for Access key – Programmatic access. This option allows the user to interact with AWS services.

check the box for Access key – Programmatic access

To allow the new IAM user to manage your S3 buckets and objects, you need to assign the proper permissions.

For first-time setup with Next3 Offload, it’s recommended to use the AmazonS3FullAccess policy. This avoids permission errors during configuration. Advanced users can later switch to a custom IAM policy to restrict access more specifically.

Now, select Attach existing policies directly. In the filter box, type “s3” to find related policies. From the list, scroll down and check the box for AmazonS3FullAccess. Then click Next: Tags to continue.

check the box for AmazonS3FullAccess

At this stage, you have the option to add tags to your IAM user. Tags are key-value pairs that help you organize and manage AWS resources more easily.

Adding tags is optional. However, if you regularly work with AWS, using tags can simplify administration and tracking.

Once done, or if you choose to skip this step, click the Next: Review button to move forward.

click the Next Review

If everything looks correct, go ahead and click the Create user button.

click the Create user button

Once the user is created, you’ll see their security credentials, including the Access Key ID and Secret Access Key.

Make sure to download these credentials as a .csv file and save them in a secure location. Amazon will not show the Secret Access Key again after this step.

If you lose the keys, you won’t be able to view them later. However, you can always create a new set of access keys from the AWS Management Console if needed.

Access Key ID and Secret Access Key

Method 2:

After signing in to the AWS Management Console, the next step is to create a new IAM user.

Start by entering a name in the User name field. This will help you identify the user later.

Under Access type, select the checkbox for Programmatic access to enable API and plugin access. Then click the Next: Permissions button to continue.

Programmatic access to enable API

On the Permissions page, you need to assign a policy to give the user access to Amazon S3.

As a first-time user, it’s recommended to select AmazonS3FullAccess. This ensures the user has full permissions to manage S3 buckets and objects without running into access issues.

select AmazonS3FullAccess

After reviewing all the details and confirming everything is correct, click the Create user button.

Create user button.

Now, in the AWS Management Console, navigate to: IAM → Users → next3 (or the name of the user you created).

Then click on the Security credentials tab. 

IAM → Users → next3

In the Create access key section, you’ll go through three steps to generate a new key.

For Step 1: Access key best practices & alternatives, choose the option Command Line Interface (CLI) since you’re using the key for plugin or programmatic access.

Command Line Interface (CLI)

Next, move to Step 2. Here, you can add a description tag to help identify this access key later. 

Once you’ve added the description, click the Create access key button to generate the key pair.

Create access key button

In Step 3, you will see your newly created Access Key ID and Secret Access Key.

Make sure to copy and save these keys in a secure place, as you won’t be able to view the Secret Access Key again later.

These keys are essential for connecting your WordPress plugin to Amazon S3.

created Access Key ID and Secret Access Key

Step #5: Bucket Public Permission

In the Amazon S3 console, you’ll find a Block Public Access settings page in the sidebar under Account Settings.

It’s important to disable public access to objects for all your existing and future buckets to keep your data secure.

To do this, navigate to Amazon S3 → Buckets, then select your specific bucket name. After that, click on the Permissions tab to manage its access settings.

Amazon S3 → Buckets

Check the box for Block all public access. Then click the Save Changes button to apply the settings.

Check the box for Block all public access

In the Edit Object Ownership section, check the box to enable ACLs and select Object Writer. This setting controls who can manage permissions on the objects. Remember to click the Save Changes button to apply and save your setup.

Edit Object Ownership section

Step #6: Define Your Access Keys

To let Next3 Offload Media connect with Amazon S3, you need to add your AWS Access Keys to your website.

Open the CSV file you downloaded earlier and copy the Access Key ID and Secret Access Key.

Then, paste these keys into the plugin settings to establish the connection with Amazon S3.

paste these keys into the plugin settings

Once done, click the Next button to continue the setup.

Step #7: Configure Next3 Offload 

First, you need to choose the bucket that Next3 Offload will use to store your newly uploaded media files on Amazon S3.

The plugin’s setup page gives you the option to either select an existing bucket or create a new one for this purpose.

This bucket will be where all your WordPress media files get offloaded to the cloud.

Choose the bucket

Enter the name of the bucket you created earlier or create a new bucket. Then click the Save Settings button to confirm.

click the Save Settings

If you don’t have a bucket yet, click the Create Bucket link. This will open a form where you can enter the bucket’s name and select its region. Then click on the Create New Bucket button.

click the Create New Bucket link

You can also choose to Browse Buckets if your IAM User has permission to view them.

choose to Browse Buckets

After making all the bucket-related changes, click on the Save Settings button.

Save settings

Step #8: Configure Storage Settings

Once Amazon S3 is connected to your WordPress site, the next step is to configure the basic settings under Storage Settings.

To do this, go to your WordPress Admin Dashboard and open the Next3 Offload menu. From there, you can adjust the storage options to fit your needs. 

Open the Next3 Offload menu

From the Next3 Offload control panel, you can manage all your media offloading settings, monitor storage usage, and customize how files are handled between WordPress and Amazon S3.

Now, use the toggle buttons to enable Offload Media and Copy to Local Server options.

Offload Media and Copy to Local Server options

Scrolling down, you’ll find options for Setup Path and File Management. Here, you can customize settings like adding a prefix to the bucket path, organizing files by year and month, including object versions in the path, renaming files, and choosing the offload format for the cloud.

These options help keep your media files organized and easy to manage.

storage settings set up path

Step #9: Set up Delivery Settings

Now, it’s time to choose a provider to deliver your offloaded media files. Head over to the Delivery Settings section to set this up.

Delivery Settings section

Next, select your delivery provider from the available options.

Delivery Settings section

You can also activate basic features in the Delivery Settings. After enabling the basic functions, click on the Save Settings button.

Save Settings button

Step #10: Set up the Offload Settings

Finally, proceed to configure the Offload Settings.

configure the Offload Settings

You can now choose to offload all your existing media files or select them one by one. Simply click the Offload Now button to start transferring your WordPress media library to AWS S3.

Offload settings to offload files

You also have options to restore offloaded files back to your local server and to clean up offloaded files from local storage when needed.

These features give you full control over where your media files are stored.

Restore offloaded files back to your local server

You can also offload your existing CSS and JavaScript (JS) files to the cloud. This helps reduce your server load and speeds up your website.

offload your existing CSS and JavaScript (JS) files

Note: You can check your WordPress media library to see whether your files have been offloaded or not. 

FAQs

1. What is Amazon S3 for WordPress?

Amazon S3 for WordPress is a cloud object storage service that stores your website’s media files such as images, videos, PDFs, and documents in an Amazon S3 bucket instead of on your web server. Offloading media to Amazon S3 reduces server storage usage, improves scalability, and can speed up your website when combined with a CDN like Amazon CloudFront.

2. How do I upload my WordPress Media Library to Amazon S3?

Use a WordPress media offloading plugin to connect your AWS S3 bucket, configure your AWS credentials, and offload existing and future media files. Once connected, the plugin automatically uploads media to S3 while keeping media URLs accessible from WordPress.

3. Can I move my existing WordPress uploads to Amazon S3?

Yes. Most WordPress S3 plugins can migrate your existing Media Library to Amazon S3 without breaking image URLs or media references. Always back up your website before migrating existing files.

4. Do new uploads automatically go to Amazon S3?

Yes. After configuration, newly uploaded images, videos, PDFs, and other media files are automatically stored in your Amazon S3 bucket instead of your web server.

5. Will my website still work if I remove local uploads?

Yes, Next3 Offload plugin rewrites media URLs to point to Amazon S3 or your CDN. Always verify all media files are accessible before deleting local copies.

Final Words on How to Upload WordPress Media Library to AWS S3

Upload WordPress media files to AWS S3 to make your website faster and more efficient. This takes the load off your WordPress server, helping your site load quicker for visitors.

Also, uploading WordPress media library to AWS S3 means your site can handle more visitors without slowing down. Since Amazon’s storage is designed to grow with you, you won’t have to worry about running out of space or your site getting too slow when traffic spikes.

Another good thing is that Amazon S3 is cost-effective. You pay only for the storage and bandwidth you actually use, which can save money compared to buying bigger servers.

Amazon S3 keeps your files safe with strong security measures like access controls and encryption. So, your media files are protected from unauthorized access, giving you peace of mind about your website’s data.

You May Also Read

next3offload
Mehrin Ferdous
Written By

Mehrin Ferdous

Mehrin is a content writer of ThemeDev who prefers to write about tech products, travelling, health, food, lifestyle, marketing, technology etc. She also works for creating video. She has completed her Bachelor's degree in Computer Science and Engineering. Her hobbies include blogging, reading, cooking etc.

Keep Reading

Join Thousands of WordPress Users

Get practical WordPress optimization tips every week. No spam, unsubscribe anytime.

Would you love to receive WordPress speed optimization tips, plugin updates, coupons, and more from Next3 Offload? Just enter your email address below and press Subscribe.

Next3 Offload

Subscribe now for early access and be the first to know!

👉 Press 'B' anytime to buy