How to use Amazon S3 and CloudFront CDN for WordPress

Judy| 2016-12-16 CDN, Tutorials Comments( 0 )

Cloud computing is a serious term to be considered when it comes to increase your website’s performance in terms of speed. At most basic level, cloud storage is used to store various parts of your site including images, style sheets and other similar assets on a unique remote server. A CDN (content delivery network) is then used in order to connect cloud storage and server files with a wide network of fast servers spread all around the globe. This network ensures that downloads and connection is online at fastest.

AWS (Amazon Web Services) have managed to leave their impact in the field of cloud computing specifically because their s3 and CloudFront services.  Amazon s3 and CloudFront plug-in helps to implement these services quickly. These services will allow you to speed up your website and back it up on regular basis. All this you get for a comparatively cheap cost. Here is the full description for setting AWS up:

Setting up Amazon web services:

First thing to do is to create an AWS account on signup page using credential of Amazon. Creating an account would sign you up for every service; however, you would pay only for what you use. Create a S3 bucket in order to store your files. To do so, click on S3 button that you will find on main dashboard. Here, you can click on create a bucket option to create your cloud storage space. For now, let this bucket empty and move to CloudFront.

To set it up, return to dashboard and click on CloudFront service link and then click get started located under web option. In next step, you will be linking the s3 bucket created earlier which will be used to serve files. There would be lot of other options too, leave them blank and select create distribution option. The last thing to do is to get API keys that would link word press and AWS cloud without any authentication. To do create IAM user by going to IAM console and click on groups tab. To create a new group click on administrative access to create the group. Now go to user tab and click on create user. You will be provided with secrete access key. Now finally link the group with the user.

This setup would allow you to connect your word press website with cloud. Most common use is that it would serve media files to users through the cloud. They are also used four routine backups and streaming videos. Following are some useful plug-ins.

Amazon s3 and CloudFront plugin:

Amazon s3 and CloudFront plugin is great for those who do not require a full featured catching plugin. This plugin is greatly recommended for the users of Amazon web services plugin. Amazon web service plugin is used to connect the word press website with your Amazon web services setup and Amazon s3 and CloudFront plugin is used to store media files on cloud storage service.

In order to set up this plugin, once requires to access key and secret access key through wp-config.php file of the website. Simply open the file and add following lines:

Define (‘AWS_ACCESS_KEY_ID’, ‘******************<strong><em>’);

Define (‘AWS_SECRETE_ACCESS_KEY’,’</em></strong>*************************’);

Make sure not to add these stars, simply replace them with your own access key and secrete access key. Now that you have added the keys and saved plugin settings, you can alter the functionality in s3 and CloudFront. Here, you can choose between several buckets for storing your media files. Optional cloud front distribution support can also be added. Despite the plugin working without this setting, it is recommended to give some time since it will noticeably speed up your websites loading time. There are various other options too such as defining to store files locally and in the cloud or not and also if files can be served over SSL or not. These boxes need to be checked so that the plugin would function properly with the cloud.

Once setup is properly done, all the future files would be uploaded to cloud. All the rules and settings you defined would be followed when serving these files to users.

W3 total cache and AWS:

This is a famous plug-in capable of doing a lot of things automatically for your website. This is the most common plug-in used by hundreds and thousands of websites. Following are some useful applications:

·         Minifying style sheets

·         Combining style sheets

·         Combining scripts

·         Minifying scripts

·         Catching static version of pages

·         Speeding up loading of entire site

Once the plug-in is installed, go to general settings and select Amazon CloudFront option under origin menu and check CDN option. Once these settings are saved, access the CDN and input access key and secrete access key of s3 bucket in configuration settings. Now you can access the bucket from the origin menu.

Now finally, you can upload your files to s3 bucket. The file export can be automatically performed since the plug-in features in built functionality for that operation allowing you to perform it in couple of clicks. Once necessary files are uploaded, you are all set for using a CDN with your word press website. Now all files would be automatically added to the cloud and CloudFront would be used to serve these files to user ultimately increasing loading speed of your website.


So the ultimate fact is, your website can enjoy a great speed boost and limit your hosting cost with a combination of s3 bucket and CloudFront simply by implementing Amazon s3 and CloudFront plugin. Note that it is not a perfect hosting solution that is capable of hosting your entire site. However, you can easily connect word press site with AWS with simply implementing some plug-ins without worrying about backend mechanics. If you are expecting a quick boost for your website, there could be nothing better than this.

We hope webmasters to share and promote the good articles ,Please click herecontribute

You need to log in to commentLogin|Register

Be the first to comment!