W3Total Cache (W3TC) is the most powerful plugin on which you can rely on to speed up your Blog. With this Plugin you can increase your page load speed by almost 10-15 times. This post will explain how to configure W3 Total Cache plugin from General Settings to CDN Settings by keeping things simple. Actually *Very Simple*.
First things First!
Install W3 Total Cache plugin from the Plugins directory. You need a MaxCDN account or any other CDN service to host your Theme static files (This post explains how to get things done with MaxCDN). You can signup for MaxCDN service here. by using this coupon code and After installing the plugin, you need to configure it. This post will explain how to configure the plugin effectively in order to maximize the blog’s performance.
How to configure W3 Total Cache with MaxCDN
#0. Install W3 Total Cache Plugin.
#1. Page Cache:
Enable Page Cache with Disk: Enhanced method. Leave all the General Settings of Page Cache as it is.
Leave the General settings of Minify as it is and head to HTML & XML settings. Enable HTML Minify with Inline JS Minification and Line break removal.
Under JS: Enable JS manify.
Under CSS: Enable CSS minify with Preserved comment removal and Line break removal. Add your Theme CSS file by clicking on Add Stylesheet. Leave other advanced settings as it is.
#3. Database Cache:
Enable Database Caching with Disk cache method in the General settings page.Leave the default settings as it is in the Database Cache page.
#4. Object Cache:
Enable Object Cache with Disk Caching method in the General settings page. Leave the default settings for Object Cache in the Object Cache page.
#5. Browser Cache:
Under General settings: Check Set expires header, Set entity tag (eTag) and leave all other settings as it is.
Enable CDN and we have selected NetDNA/MaxCDN as our choice. Setting up CDN has two phases. First one is pointing your CDN to your Host and Second one is Configuring CDN settings in the Plugin.
#i. Login to your MaxCDN account. [#]
#ii. After logging in to your dashboard, Navigate to Manage Zones. Under Pull Zones, Click on Create Pull Zone.
#iii. Enter Pull Zone Name, Original Server URL (make sure you include http://), Custom CDN domain (ex: cdn.yourdomain.com), Label (description) and check enable Compression and click on Create. By now your Pull zone would be successfully created and a message will be shown to create a CNAME record, which would look something like this: “Please create a CNAME record for cdn.yourdomain.com to yourdomain.netdna-cdn.com”
#iv. Now you need to login to your Host to create a Name Server. Click on Advanced DNS Zone Editor > Select your Domain name and create a Record by selecting the type of the record as CNAME.
Copy paste Name and CNAME from your MaxCDN account and set TTL to 14400 seconds.
#v. Now you are done with poiting up your Host and MaxCDN. Now you need to collect the API ID and API Key from MaxCDN, which are available at Manage Account > API or directly here.
#vi. Enable CDN and Select NetDNA/MaxCDN from the list and copy paste API ID and API Key. You will need to add your custom domain in Replace site’s default hostname with field, our’s is: cdn.wpskool.com and click on Test Connection. Under advanced settings of CDN, include static files and folders you need to be hosted on CDN.
#vii. If you have done everything correctly, It should work perfectly. Ex: Static image files should be served from CDN rather than from your actual host.
Actual URL must be replaced with CDN URL.
Ex: http://www.yourblog.com/wp-content/assets/mail.png should be replaced with:
#7. So what else? Just take a backup of your W3 Total Cache plugin configuration settings by simply exporting the configuration file, to be in safe side.
Additional Tip: Install WordPress Gzip compression plugin to maximize the results of Google Page Speed Test. By performing the above steps you can easily maintain a score of 80 and above.
If you have any problems in configuring the Plugin, Let us know them in the comments section.