Every time we talk about speeding up WordPress blog, one of the most recommended tip is to setup CDN on your blog. Setting up CDN for the first time sounds like a rocket-science but in real, you can easily set up MAXCDN within minutes of work. Here I’m sharing a quick guide on how you can setup MAXCDN with Wp super cache Plugin. MaxCDN is one of the recognized and most popular CDN service. They have been in the market from long and most of the popular blogs I know are using MAXCDN. If you don’t know about CDN and it’s benefits, you should read following post:
At the time of writing, they are running a special promo of 1Tb free MAXCDN account for the month of August 2012 and 1 TB is quite good for almost a year for an average traffic WordPress blog. Sign up for Free MAXCDN account.
Setting up Content delivery network (MAXCDN in this case) on your blog requires you to do few things, and I will quickly outline them:
- Setup Pull zone from MAXCDN
- Add CNAME record to your domain
- Setting up cache plugin (Super cache in this case)
That’s it any your site will be way faster than before, as all the files will be served from the server nearest to your visitors. Also, your server load will go down by a great percentage. Since most of WordPress sites are hosted on shared hosting like Hostgator, Bluehost, Dreamhost or any other, it’s always a good idea to set up CDN, as this will speed up your site loading time. If you are not aware of, site speed is one of the ranking matrices which we can’t afford to ignore. Here is a nice intro video, which explains what using MAXCDN can do for your site:
Setting up MAXCDN Pull zone:
Login to your MAXCDN dashboard and click on manage Zones to click your first zone. Under Pull zone, click on create Pull zone.
Here we need to add few values and here are field and example of values you can add:
- Pull Zone name: Use your domain name.
- Original Server URL: Enter your domain name with http:// and / at the end.
- Custom CDN name: Use cdn.domain.com . You can use anything instead of CDN like files.domain.com or anything.
- Label: Give a Label to your CDN zone, this will be useful when you are configuring CDN for multiple sites. Keep it unique and preferably your domain name.
- Compression: Put check mark here
So, by the end your setup should look like this:
Once you click on Create, it will take a moment and page will refresh automatically to give you CNAME record you need to add in your domain manager. You can always get this detail by clicking on Manage Zones > Pull Zones
So my final details are as:
- Zone ID:
- Temporary URL: cydiaguide.rtchamp.netdna-cdn.com
- zone Name:
- Original URL:
Adding CNAME record from your domain manager to use MAXCDN content delivery Network:
Now, all you need to do is login to your domain manager and under your domain DNS management, click on CNAME and add a record for cdn.domain.com to point it to Temporary URL. This may sound technical, but it’s quite easy to do and it will not take more than a moment to finish.
Godaddy users can refer to this guide. ShoutMydomain users can follow this screenshot and for any other domain manager, process will almost the same.
- Login to your domain manager account.
- Under your domain management, find the field to update/manage DNS record.
- Search for CNAME and your final value should be something like this:
Click on Add record and you have successfully added the CNAME record. If you find it hard to do for your domain registrar, ping your domain technical support and ask them to add the CNAME record as provided by MAXCDN.
Note: We need to wait for 1-2 hour as CNAME changes will take time to reflect but so far we have done all the part from our MAXCDN dashboard and at domain registrar. In many cases, CNAME update make take up to 48-72 hours, so you need to wait until your CNAME is propagated. You can check the status of CNAME by adding your CNAME here. Ex: cdn.cydiaguide.com
Once, CNAME changes is reflected, we can go ahead and enable CDN in wp super cache by following below guide.
Setting up Wp Super cache to use MAXCDN:
Now, we are done setting up ZONE at Maxcdn dashboard and also updated the CNAME record to use MAXCDN. Now, the only thing is left to setup super cache plugin to use CDN. Go ahead and download and Install Super cache plugin. Refer to my earlier guide on How to setup Super cache plugin to make most out of it.
- Login to WordPress dashboard
- Click on Settings > Wp Super cache
- Click on CDN Tab
Put a check mark on Enable CDN and in off-site URL, use the CDN which you have created. In my case it’s cdn.cydiaguide.com
Click on Save changes and clear all your cache. And now check your site load time and source code to see where images are getting served from.
- Earlier your images location would be: http://domain.com/wp-content/***
- After CDN implementation: http://cdn.domain.com/***
Here are some of the FAQ’s which was asked by one of the readers and I hope it will help you too:
Q) What will happen to previous uploaded files? Will all previously uploaded files will be uploaded on MAXCDN server? Automatically or I need to do something?
A) You set up as a pull zone, which means MaxCDN will automatically pull all your content from your server. So there is no uploading to be done.
Q) What will happen if I decide to remove CDN after a while?
A) If you disable CDN, there will be no issues. As MaxCDN (when using a pull zone) pulls all the date from your server in the background, MaxCDN will be up to date. Although if you ever edit a already existing file, let’s say replacing an image, the cache will need to be cleared on the CDN in order for the file to update on the CDN. So if you disable CDN in future, your site will be working like the way it was but without the benefits of CDN.
So in nutshell, using CDN on your blog will give you an extra advantage of faster loading site and your readers will be more happy. How many of you are using a content delivery Network on WordPress blog ? If you are still stuck with any configuration part, do let me know and I will love to answer your questions. If you find this tutorial useful and informative, don’t forget to share it on Facebook and Google plus.