We all know CDN helps to decrease the blog load time but again most of CDN services are paid. Here I’m sharing a tutorial on how you can use your free Dropbox account as CDN account using Super Cache WordPress plugin. Using CDN will significantly decrease your blog loading time and I have tried and tested it on my blog today. Here at ShoutMeLoud, we already shared a post on How to boost your blog with Rackspace cloud files but again you need to pay for Rackspace account.
You will be surprised to know that Dropbox lowered the site’s load time up to 4 times. My site took around 6.1 seconds to load but after using Dropbox, the load time get lowered to just 1.5 seconds. That’s exactly 4.06 times lower. Some other advantages of using Dropbox as CDN are that its free and also, it lowers down the site’s bandwidth.
Look at the screenshot below in which you can see the how much fast Dropbox loads then other CDN servers.
How to Use Dropbox as CDN
First of all you download all of your site’s static files (i.e wp-content and wp-includes folder in WordPress). Upload all the files to Dropbox and link to them from your site. Well the linking thing is pretty much lengthy so you may need a Plugin, WP Super Cache for that purpose. I guess all the WordPress users use it but if you don’t, download the plugin from here and install it.
1. Download COMPLETE wp-content and wp-includes folders (you can skip .php files) from WordPress.
2. Create a new Directory i.e CDN in your Dropbox public folder. (If you don’t have a Dropbox account sign-up here)
3. Create a new sub-domain i.e cdn.example.com. (Scroll down to learn why to create a sub-domain and what to do if you don’t want to create sub-domain)
4. Open your site’s file manager and in the directory CDN, create a new file named .htaccess and add the following code in it. (Replace ID with your Dropbox ID)
Redirect 301 / http://dl.dropbox.com/u/ID/cdn/
5. Open the Super Cache settings page and click on the CDN tab. Configure the settings accordingly. (Replace cdn.havefunforever.com with the url to sub-domain you created in 3rd step)
6. Click on Save button and you know what? Everything is done.
Why a Sub-Domain? I don’t want to create a sub-domain!
Well the sub-domain thing is optional but I prefer to use it because it keeps URLs clean and is also better for branding. If you are sure you don’t want to create a sub-domain then you can do the following.
- Skip 3rd and 4th step.
- In the Super Cache CDN setting page, in Off-site URL, give the path to your Dropbox folder where all the files resist i.e http://dl.dropbox.com/u/ID/cdn.
From now-on, all of your files would be hosted on Dropbox so whenever you change anything in wp-content and wp-includes folder (expect changes in php files), you must also apply the changes to the files hosted on Dropbox. If you upload any image to your WordPress site, you must also upload the images to Dropbox.
Do let us know if you have any query while setting up Dropbox as CDN. Also if you have set up this free CDN for your WordPress blog, don’t forget to check your blog load time and let us know the difference.
Subscribe Updates, Its FREE!