Monday, August 20, 2012

Configuring W3 Total Cache Plugin with Amazon Cloudfront - WordPress Caching


Long back I have written an article about the W3 total cache plugin configuration for shared web hosting users. Today I would like to write something which really interests any webmaster, who want to learn on how to speed up their WordPress blog. My previous articles are fine enough to configure your WordPress blog basically, what if you want to improve your blog performance more than that, like a lightening.. first of all was it really possible?. Yes, it is possible if you know how to do it. Do you know that website speed is one of the most important factors in the SERP rankings these days?.
Your blog speed can decrease your WordPress SEO value, the best way to overcome this problem is caching!. Before I move further, do I mention about “Amazon Cloudfront”?. Yes, most of the webmasters thought that Amazon CDN services are very expensive… but the truth is, it is not. Probably I could say that it is the most cheapest CDN services on the planet. Trust me, I have 40k to 50k unique visitors per month, do you know how much I charged for the CDN (of-course it is usage based billing only..), exactly$0.85, means 85 cents. It is really unbelievable but truth, so Amazon cloudfront is definitely very cheap and the best way to speed up your WordPress blog.
So let’s learn how to configure W3 total cache plugin with Amazon cloudfront. Remember, to use Amazon cloudfront, you can also make use of other plugins but I highly recommend everyone to use W3 total cache, because it is considered as the most powerful caching plugin for WordPress. Let’s begin…
wordpress amazon clodfront configuration Configuring W3 Total Cache Plugin with Amazon Cloudfront   WordPress Caching

Configure W3 Total Cache with Amazon Cloudfront:

1. Create an account in the Amazon AWS.
2. Once you finish the signup process, it will took few minutes or hours (sometimes) to activate your account.
3. Now you need two things, the “Access Key ID” and “Secret Access Key“. Which you can find at the upper right hand side,under  My Account > Security Credentials, you can also find this section at this link. If you want you can use the default key pair, or else switch to “Key Pair” section, where you can create new key pair. See the screenshot below…
Amazon AWS Access Key Section Configuring W3 Total Cache Plugin with Amazon Cloudfront   WordPress Caching
Amazon AWS Access Key Section
4. Once you got the key pair, now go to your WordPress control panel, and open W3 total cache General settings page. Now scroll down and go to CDN section and selectAmazon Cloudfront under Origin Push method.
5. Now go to CDN section, under “Configuration” provide the Access key ID andSecret Key.
6. Type the bucket name (you can set any name for your storage bucket) and hitCreate Bucket & Distribution. It will take few seconds and it will show a message as your bucket has created successfully.
configuring amazon coudfront in wordpress Configuring W3 Total Cache Plugin with Amazon Cloudfront   WordPress Caching
Configuring Amazon Cloudfront in WordPress
7. Now go back to your Amazon AWS account, now you can able to see one distribution under Cloudfront services, one bucket created under S3 services.
8. Under Cloudfront services, note down the domain name of the cloudfront URL and paste it in to the hostname section.
9. You are almost done, now just hit “Test S3 upload & Cloudfront Distribution”. If it shows text passed, then you are done. You have successfully configured your amazon cloudfront.
10. If you wish to have your own sub domains as CDN name for SEO juice, you need to create CNAME records in your DNS configuration. Point the sub domains to the cloudfront URL, check out the image below..
configuring CName records Configuring W3 Total Cache Plugin with Amazon Cloudfront   WordPress Caching
Configuring CName Records
11. It is up to you, if you want to have multiple URLs to serve the content then you can create even more sub domains and point to same Cloudfront URL.
12. Now go to Amazon cloudfront and click on the distribution created, now you can see an option as “Edit”. Click on that, it will open a popup, in there you can see “Alternate Domain name section (CNAME)” mention the sub domains you created for your CDN and Save.
cloudfront cdn configuration Configuring W3 Total Cache Plugin with Amazon Cloudfront   WordPress Caching
13. After creation of the DNS records, don’t change the hostname fields in w3 total cache configuration, the DNS records take 24 to 48 hours for the propagation around the world. Once propagation finished, go ahead configure it in the host name field, as shown in the second image..
14. You are done.
Today we learn about W3 total cache configuration with Amazon cloudfront, please do drop your comments, suggestions and questions in the comments section below..

No comments:

Post a Comment