Use Dropbox as a CDN for your WordPress Blog

For optimal site performance, it is recommended that you use a CDN (Content Delivery Network) to host your website’s static content – like images, CSS and JavaScript files – since it effectively reduces the physical distance between the user’s browser and your content.

A CDN is a collection of web servers distributed across multiple locations to deliver content more efficiently to users. The server selected for delivering content to a specific user is the one with the fewest network hops. [Yahoo]

Amazon S3 is among the most cost-effective CDN for hosting WordPress files but if you are not on S3 yet, you may well consider using the Dropbox service as a CDN to serve the static files of your WordPress blog.

How? There’s a new WordPress plugin in town that can help you effortlessly deploy all the static files associated with your WordPress theme to Dropbox.

It works something like this. You create a sub-folder in your Dropbox Public folder and replicate your WordPress theme folder structure here. Next grab the URL of this public folder, pass it to the Dropbox CDN plugin and it takes care* of everything else.

dropbox cdn

Will this really help improve performance? Based on the suggestion of David Bradley, I conducted a quick test to compare the loading speed from Amazon S3, Dropbox, Google CDN and my existing host which is Dreamhost.

An uncompressed JS file was served from all the four servers and the load time of Dropbox turned out to be among the lowest (see the blue bar) partly because Dropbox automatically served the file with gzip compression.

Related resources:

PS:The Dropbox CDN plugin will not work with WordPress themes where the file paths are hard-coded into the code. Check your header.php file to ensure that you use standard functions like bloginfo(‘stylesheet_directory’), etc. to echo the static file names.

Amit Agarwal

Amit Agarwal

Google Developer Expert, Google Cloud Champion

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.

Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

0

Awards & Titles

Digital Inspiration has won several awards since it's launch in 2004.

Google Developer Expert

Google Developer Expert

Google awarded us the Google Developer Expert award recogizing our work in Google Workspace.

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards in 2017.

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional (MVP) title for 5 years in a row.

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator title recognizing our technical skill and expertise.

Email Newsletter

Sign up for our email newsletter to stay up to date.

We will never send any spam emails. Promise.