After being with WordPress almost 6 years now, we have used most of the top rated hosting providers before settling on our current provider Linode. While checking the page speed test, we understand that the images took more time to load and it’s the main reason for the increase in loading time. So we did some research and found a good solution to sort out this issue. So what’s is it?
Hosting Media Files in Cloud Storage.
Cloud storage is best option to host the media files rather than traditional hosting servers. Because of the best infrastructure, and fast connection it is a good choice.
- Increase Performance
- Pay as you go
- Site migration is easy
- Extra cost
Amazon AWS – A Better Choice
I’m a proud fan of Amazon AWS. Their architecture is highly scalable with headache-free maintenance. So in this guide explains how to use AWS as a storage engine for your WordPress site/blog using WordPress S3 Plugin.
You need a couple of things to get started
Steps for AWS S3 Setup
Login into your AWS console or if you don’t an account create a one here.
Creating S3 Bucket
You’ll need to give a name for your bucket, and that name should be unique from all of the s3 users. You can use alphanumeric characters without spaces. In our case we chose techsbot.
Creating AWS user
Once finish creating the bucket, you have to get API keys. These keys will allow WordPress to connect with your AWS cloud without needing to authenticate every time they do. You can do it by going to AWS IAM Console.
Amazon highly recommends using user accounts to perform all S3 operations like read, write.
Give this user Programmatic Access.
While creating a user it will ask you to select AWS access type. Select Programmatic access from the list.
You need to create a user group to grant access to the user. Create a new user group with AdministratorAccess Policy.
After assigning the group you will get a user with Access key and Secret Access Key. It’s one-time key so download it and store it somewhere safe on your computer.
We will need the access and secret key for the below configuration.
Configuring WP Offload S3 Plugin
Now login to the WordPress blog, install & activate WP Offload S3 Lite plugin. After the activation, you will get AWS icon on the left side of your wp dashboard. Click on the menu and you will be asked to make changes in the wp-config.php file.
Open your site’s wp-config.php file and add the keys as in the above image.
After that, you will be asked to create a bucket, as we already created a bucket we will choose Use Existing Bucket and choose the created bucket from the options.
wp-content/upload is the default path. All your media files will be uploaded to that directory. If you want to use a custom path you are free to create your own path.
You can also force HTTPS for HTTP requests.
Some more additional featured allows you to setup custom domain, remove files from servers, and object versioning. You can change it or not. That’s up to you.
Great! You have successfully configured AWS S3 for your site. Test your configurations by uploading images. You can also check our images for reference.
Using AWS S3 surely will give your site a great performance boost. And you can also try it for free of cost with AWS $300 Credits. Hope this guide will be useful for you. If you have any doubts, feel free to drop us a comment. We will reply as soon as possible.