Enjoy Up To
80% OFF

How to Connect Amazon S3 with WordPress to Offload Media

How to Connect Amazon S3 with WordPress to Offload Media

WordPress is one of the most popular content management systems (CMS) for building websites. It allows users to easily create and manage websites, including media files such as images and videos. 

However, as your website grows and your media library expands, you may find that your WordPress server is struggling to handle the load. This is where Amazon S3 comes in. Amazon S3 (Simple Storage Service) is a highly scalable, secure, and cost-effective cloud storage solution that can be integrated with WordPress to store and serve media files from the cloud.

In this blog, we will discuss how to connect WordPress to Amazon S3 bucket with a plugin to your website, and how it can benefit your website.

What is Amazon S3?

Amazon S3 (Simple Storage Service) is a cloud-based object storage service provided by Amazon Web Services (AWS). It is designed to store and retrieve any amount of data, at any time, from anywhere on the web.

Amazon S3 is used to store and retrieve a wide range of data types, including documents, images, videos, backups, and log files. It provides developers with a simple web services interface that can be used to store and retrieve data from anywhere on the web.

Amazon S3 is highly scalable, reliable, and durable. It stores data across multiple devices and facilities, providing high availability and data durability. It also provides features such as versioning, access control, and encryption, making it a secure and flexible storage solution for businesses and individuals alike.

Amazon S3 is used by a variety of organizations, from small startups to large enterprises, for a wide range of use cases such as backup and archiving, web and mobile application hosting, and big data analytics.

What are the advantages of using Amazon S3 for your WordPress site?

There are several advantages to using Amazon S3 for your WordPress site, including:

  1. Scalability: Amazon S3 is highly scalable, meaning it can handle large amounts of data without any issues. This is particularly useful for WordPress sites with a lot of media content such as images and videos.
  2. Cost-effectiveness: Amazon S3 offers cost-effective storage solutions for WordPress sites. It charges on a per-usage basis, meaning you only pay for the amount of storage you use.
  3. Durability: Amazon S3 is designed to store data across multiple devices and facilities, providing high availability and data durability. This means that your WordPress site’s data is safe and can be retrieved easily in case of any data loss.
  4. Faster website speed: By hosting media content on Amazon S3, you can reduce the load on your WordPress server, resulting in faster website speed and better performance.
  5. Security: Amazon S3 provides features such as versioning, access control, and encryption, making it a secure storage solution for your WordPress site’s data.

Overall, using Amazon S3 for your WordPress site can provide several benefits, including scalability, cost-effectiveness, durability, faster website speed, and security.

The WordPress S3 connection explained

The WordPress S3 connection refers to the integration of WordPress with Amazon S3 (Simple Storage Service) for storing media files such as images, videos, and audio files.

To connect your WordPress site with Amazon S3, you can use a plugin such as WP Offload Media or Amazon S3 and CloudFront. These plugins automatically upload your media files to Amazon S3 and serve them from the cloud, rather than hosting them on your WordPress server.

Once you have installed the plugin and configured the settings, any media files uploaded to your WordPress site will be automatically transferred to Amazon S3. The plugin then replaces the URLs of those files with the corresponding Amazon S3 URLs, so that they can be served directly from the cloud.

This integration has several benefits, such as reducing the load on your WordPress server, improving website speed, and reducing storage costs. Additionally, Amazon S3 provides features such as versioning, access control, and encryption, which can enhance the security of your media files.

Overall, connecting WordPress with Amazon S3 can help optimize your site’s performance, reduce costs, and improve the user experience for your visitors.

Which WordPress S3 plugin should you use?

When it comes to choosing a WordPress S3 plugin, it is important to select one that is reliable, easy to use and provides the necessary features for your specific use case. One popular plugin that meets these criteria is the Next3 Offload Media plugin.

The  Next3 Offload Media plugin is a WordPress S3 plugin that offers advanced features for managing media files on WordPress sites. It integrates with Amazon S3 to store media files in the cloud, freeing up server space and improving site performance. This plugin is ideal for large WordPress sites with high traffic and lots of media files.

One of the key benefits of using the  Next3 Offload Media plugin is its ease of use. It provides a user-friendly interface that makes it easy to configure and manage media files on your site. It also offers automated backups, image compression, and CDN integration, which can further enhance the performance and security of your WordPress site.

Another advantage of the  Next3 Offload Media plugin is its ability to handle large amounts of media files. It supports batch uploading of media files to Amazon S3, making it easy to transfer existing media files to the cloud. Additionally, it automatically optimizes media files for faster loading times, reducing the overall size of your media library.

Overall, the  Next3 Offload Media plugin is a reliable and feature-rich solution for managing media files on WordPress sites. Its integration with Amazon S3 provides scalability, reliability, and cost-effectiveness, making it a great choice for large WordPress sites with high media requirements.

How to Connect Amazon S3?

You can easily offload your WordPress Media Library to Amazon S3 by accessing Next3 Offload in the most prominent way. 

You need to follow some steps to use Amazon S3 provider. 

  1. Install the plugin Next3 Offload.
  2. Collect an active license.
  3. Log in to the AWS Console.
  4. Save all the details of AWS User’s access details.
  5. Select the provider Amazon S3 from Dashboard.
  6. Insert the given Access Key ID.
  7. Enter the given Secret Access Key.
  8. Now you can offload all media files and create buckets. 

Logging  in to The AWS Console

If you already have an Amazon Web Services (AWS) account sign in here. 

Don’t you have an AWS account yet?  You will need to sign up.

Create an IAM User

After logging into the console, you have to create a new IAM user. 

In the User name field, insert the user’s name.

Names must be unique inside your AWS account as the names are case-sensitive. Up to 64 letters, digits, and the following characters can be used in user names: plus (+), equal (=), comma (,), period (. ), at sign (@), and hyphen (-).

Click the Next: Permissions button after selecting Programmatic access under Access type.

select provider

You must offer the new user particular permissions in order to let it manage buckets and objects in the S3 service.

We advise granting the new IAM User sole access to S3 for the sake of this fast-start tutorial. When configuring Next3 Offload Media for the first time, using the “AmazonS3FullAccess” policy helps prevent potential issues; however, experienced AWS users may want to utilize a Custom IAM Policy. Any IAM User’s policy can be changed at a later time to limit access to the resources needed by Next3 Offload Media alone.

After selecting “Attach existing policies directly,” type “s3” into the filter policies entry box.

At the bottom of the screen, select the “AmazonS3FullAccess” policy before clicking Next: Tags.

select provider

It is entirely up to you whether or not to add tags. But, if you frequently use AWS, you may find that doing so will facilitate administrative tasks. Click the Next: Review button at the bottom of the page whether or not you add tags here to proceed.

select provider

If everything appears to be in order, select the Create user button.

select provider

You will be shown the user’s security credentials, which are made up of a Secret Access Key and an Access Key ID. Please download these as a.csv file and copy them to a secure location because Amazon won’t display them again. The secret key cannot be retrieved again if you lose them; however, you can always create a fresh set of keys from the console.

select provider

Define Your Access Keys

You must now add your AWS Access Keys to your website in order for Next3 Offload Media to use them when interacting with the Amazon S3 service.

We recommend providing your access keys in your wp-config.php file for increased security.

In addition, you can input your access keys in the form on the Storage Provider page of Next3 Offload Media, which is the first page displayed if no keys are defined. 

To connect with Amazon S3 select it as a provider and enter the Access key ID and Secret Access Key. 

select provider

Configure Next3 Offload Media

You must first specify the bucket that Next3 Offload Media should use in order to begin offloading recently uploaded media files to Amazon S3. The setup page for Next3 Offload Media allows you to create a bucket for usage with the service.

select provider

You can enter the name of the bucket you’ve previously made and click the “Save Bucket Setting” button.

The “Create New Bucket” link will take you to a form where you can enter the bucket’s name and region if you haven’t already done it.

select provider

You can also “Browse Existing Buckets” if you haven’t restricted your IAM User’s access to list buckets.

select provider

Protect Your Amazon S3 Bucket from Public Access

The bucket will have been configured correctly for serving media via raw S3 URLs if you created it using Next3 Offload Media. In the Bucket part of the settings, you should see “Block All Public Access Disabled”.

select provider

Note: After saving the bucket setting, you must refresh this page.

IMPORTANT: IF There is also a Block public access (account settings) page that can be accessed from the Amazon S3 sidebar that can also be used to disable public access to objects in all existing and new buckets. You might need to visit the page if the AWS account is relatively new or if someone already went there and enabled the banning of public access, click “Edit”, clear the “Block all public access” checkbox, and then save the changes.

If you’ve tried using the “Disable Block All Public Access” button on Next3 Offload Media but it doesn’t seem to be working or you’re getting “Access Forbidden” error messages, go to that website.

Final Words 

Connecting Amazon S3 with WordPress using a plugin is an effective way to improve website performance, scalability, and cost-effectiveness. By offloading media files to the cloud, you can reduce the load on your WordPress server, resulting in faster page load times and a better user experience. Additionally, Amazon S3 provides advanced security features such as access control and encryption, ensuring that your media files are safe and secure.

Written by


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.

Table of Content

Table of Contents