Google Drive vs. Docs: Embedding Documents into WordPress.com Posts

You may have run into a scenario where a document, like a PDF, had to be embedded into one of your WordPress.com blog posts. There’s an official support article present here on how you can do that, but it only deals with Google Docs.

In this post, I’m going to talk about why you should rather use Google Drive for embedding documents and how to actually do it, because the embed code from Drive doesn’t currently work on WordPress.com. A slight modification is required in the URL.

A bit about Drive

Google Drive, the cloud storage platform by Google, also has the ability to store documents (.doc, .pdf etc.) and unlike Docs, it retains their original format once uploaded. It’s also a lot more easy to manage the documents in Drive—you can upload, view and share them, however, the ability to edit is only available in Docs.

Why Drive over Docs?

It’s in the layout! Documents from Drive embedded into posts look quite different from the ones embedded from Docs. Pics or it didn’t happen! Yes, I know, nothing is better than a visual illustration, so here is a comparison of a single PDF embedded via both the services:

Can you see the difference? Click to enlarge.

The PDF from Docs is shown in a layout where you have to scroll horizontally to read the lines. Moreover, you can’t even select any text, as the embedded PDF from Docs shows up as an ‘image’.

On the other hand, the embed from Drive not only fits the frame but also has an on-screen zoom control and a button for popping out the document in a new window. Makes for a better reading experience!

How to embed Google Drive documents

Now onto the practical part!

Upload the PDF or any other supported format and share it with the desired audience. To do this, right-click the document and select Share. To make it public, click Get shareable link:

 

 

 

 

 

 

 

After it’s shared, double-click the document which opens up a preview, then select the pop-out button:

drive-1-open-external-full

 

 

Next, click Embed Item under the options menu:

drive-2-embed-menu

 

 

 

 

Copy the embed code and paste it in the post:

drive-3-embed-code

 

 

 

 

Now, wait before publishing the post!

There’s one change you got to make in the code. Where it says drive.google.com, change it to docs.google.com. If you don’t make this change, WordPress.com will turn the code into a simple hyperlink and the embed will not work. 

They haven’t added the domain drive.google.com to their whitelist yet, so until it’s resolved, you have to use this method. Rest of the code should remain the same, except width and height which you can modify according to your liking.

Happy embedding, and let me know which embed source you personally prefer! 🙂

Why I Shifted Back to WordPress.com

It was in the year 2010 that I first created a free blog at WordPress.com. Didn’t have my own domain back then and used to post on ehtis subdomain, but eventually got one a couple of years later. That was the time I started to think I’ve outgrown the features that I need on the hosted platform, and would need to move to my own self-hosted WordPress install—AdSense and the ability to add popup plugins was on my mind.

Fast forward to 2015, after years of being on a self-hosted blog, I began to realize that I didn’t actually need the features which were initially on my mind, for a personal blog. Taking care of updates, themes, server administration (I have my own VPS server) and uptime was an unnecessary labor for a personal blog, where the intention is just to write and not worry too much about customization, geo-targeting and capturing leads. I finally made the switch and following are the main reasons for it.

Stability and Uptime

It wasn’t like my VPS server was going down every other day, the situation wasn’t this bleak, but my web host used to be a target of an occasional DDoS attack, resulting in degraded service or downtime for a few hours. Most mid-level hosts don’t have the bandwidth to thwart several Gb/s attacks, and this is where WordPress.com shines. They have the bandwidth to deal with waves of traffic and hold their own against the menace of DDoS—many top websites rely on them to serve millions of page views. The infrastructure is obviously scalable, which includes load-balancers, memory and bandwidth to name a few.

Here are a few uptime stats which I’ve gathered:

Recent stats of all Automattic websites
Recent stats of all Automattic websites
WordPress.com uptime stats from 2014
WordPress.com uptime stats from 2014

WordPress.com has almost 100% uptime since October 2014, not even one day of downtime in 10 months. You can check out the complete history here, which shows 99.97%+ uptime since September 2012, the only anomaly was February 2013 with a 99.91% figure.

Where your blog gets ranked in Google depends on several factors, uptime and speed are one of those signals. You’ve got them covered here, so just focus on creating quality content!

Security and Updates

Critical security vulnerabilities can strike your installation any time as they’re discovered. Recently an XSS bug was discovered, which prompted the release of version 4.2.3 on July 23rd. Goes without saying how much damage they can cause, from sensitive information leakage to defacements.

Yes, you can set your blog to auto-update, but that may cause issues with your theme or plugins in some cases, so many like to take the manual route. Being on WordPress.com’s hosted platform, there’s a bit of peace of mind in this regard, you’re not exposed and the platform is timely updated.

Reader and Community

Just like other social media sites, WordPress.com has its own ecosystem of bloggers and readers who can find relevant content through the Reader. It’s a nice little way to get more visitors to your blog, who I’ve found will be more engaging than the search engine audience. Expect a comment if they find your content interesting!

I’ve been having a good time in the community, moving has also helped me learn many new features of the platform which is helpful because I’m trying to get into this amazing company Automattic—the brains behind WordPress.com. 🙂

And Wait, Everything is Not Perfect!

These were the prime reasons which prompted me to move my personal blog. Your scenario can be different, perhaps you’re looking for a platform where you have the ability add third party plugins. You could be looking for revenue through AdSense (there’s a WordAds program here too, just in case) or just have a requirement which is not supported here. In that case, you’re free to go the WordPress.org route, have your own hosting and customize all you want! 😉