{"id":1729,"date":"2012-02-07T14:26:09","date_gmt":"2012-02-07T19:26:09","guid":{"rendered":"http:\/\/chriscolotti.us\/?p=1729"},"modified":"2012-05-10T11:53:13","modified_gmt":"2012-05-10T15:53:13","slug":"how-to-add-cdn-to-your-wordpress-blog-site","status":"publish","type":"post","link":"https:\/\/chriscolotti.us\/technology\/how-to-add-cdn-to-your-wordpress-blog-site\/","title":{"rendered":"How To Add CDN to Your WordPress Blog Site"},"content":{"rendered":"
<\/a>Recently as I have been tweaking, tuning, and pretty much been tinkering with my various blog sites I decided to jump into the realm of Content Delivery Network integration within WordPress. \u00a0So why is this something you may be interested in? \u00a0Well I for one tend to write articles with images and graphics. \u00a0I also have found that the faster your blog responds the better it is when google indexes your site maps. \u00a0My first move to Virtacore already increased my page loads significantly since I was off the shared hosting\u00a0platforms\u00a0that are available. \u00a0So once there I decided to take it to the next level.<\/p>\n Simply put, a CDN exists to just serve up your static content from multiple servers around the world. \u00a0The idea is that you can have “push” or “pull” zones to get your content to the network. \u00a0From there,\u00a0it is replicated to localized servers around the globe. \u00a0When a person hits your pages the image content is provided to them by the nearest server, thus increasing response times. \u00a0With WordPress specifically this is pretty easy to set up<\/p>\n The first thing you need is a CDN account. \u00a0Now I teamed up with a buddy Doug Smart<\/a> over at Outsmart Computers<\/a>\u00a0to get some space on his CDN. He has an\u00a0account\u00a0with MaxCDN which is a division of NetDNA that he uses for his customers. \u00a0I have my own self-hosted sites so he simply setup pull zones on MaxCDN for me to use. \u00a0From there I just needed to create DNS CNAME’s for each domain to point to his domains. \u00a0So I have CNAME’s like this with his CDN hosting on the back-end.<\/p>\n Once the zones are setup they start pulling all the static content over and you can start getting WordPress configured to use the new file locations. \u00a0Below is a screen shot from the MaxCDN side of things provided by Doug.<\/p>\n <\/a><\/p>\n This part is so super crazy easy it is scary. \u00a0First you need to install the W3TotalCache WordPress Plugin<\/a>. \u00a0If you do not have it installed, it is pretty good and I will not go through all the other things it does. \u00a0Once installed enable the CDN function and select the provider you are using from the general settings. (Click images to enlarge)<\/p>\n <\/a><\/p>\n Once you have it enabled you need to set up the connection. \u00a0Do this by going to the CDN option on the menu at the top.<\/p>\n <\/a><\/p>\n Here is where you can decide what items you want to offload to the CDN for serving up. \u00a0You can usually leave the defaults, and depending on your CSS and JSS Minify items you can add those too. \u00a0You will need to experiment to see if you will have issues or not. \u00a0Remember these files will already be pulled into the CDN, so enabling or disabling just tells WordPress to get them locally or from the CDN.<\/p>\n <\/a><\/p>\n Now you can add your CNAME you created and your API information so that the plugin can be allowed to purge the CDN remotely. \u00a0This is very useful especially for me since I am using someone else’s CDN account and allows me to purge it without calling them.<\/p>\n <\/a><\/p>\n From here the best thing to do is run a test on WebPageTest.org<\/a>\u00a0to see if you need to add any advanced options. \u00a0I have found I did need to add some into the custom file list to pick up some added images and locations for various sites. \u00a0The last thing you do need to do it change the Browser Cache Setting to “Cache (Pubic).<\/p>\n That’s about it for a crash course on getting it working. \u00a0If you right-click any of my images you will see they are being served up by the CDN address. \u00a0you can extend this into SSL pages as well, but I currently have no need for that. \u00a0More detailed information is available on the MaxCDN site<\/a>\u00a0and from the W3TotalCache<\/a>\u00a0documentation. \u00a0The cool thing is once you are setup each new image will be pulled in and configured for you post by post. \u00a0You have nothing else to do except write your posts and upload your images.<\/p>\n <\/p>\n","protected":false},"excerpt":{"rendered":" Recently as I have been tweaking, tuning, and pretty much been tinkering with my various blog sites I decided to jump into the realm of Content Delivery Network integration within WordPress. \u00a0So why is this something you may be interested in? \u00a0Well I for one tend to write articles with images and graphics. \u00a0I also …<\/p>\n","protected":false},"author":2,"featured_media":1845,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[8],"tags":[299,81,298,253],"jetpack_publicize_connections":[],"yoast_head":"\nWhat is a Content Delivery Network (CDN)?<\/h3>\n
Setting up Your CDN Zones<\/h3>\n
\n
Configuring W3TotalCache for CDN<\/h3>\n