How to Use Google Drive in WordPress Media Library

You can use your Google Drive photos and files inside the WordPress media library.

Use Google Drive With WordPress

Do you Use Google Drive?

I’m sure that many – if not most – of you also use Google Drive to store your files and documents? Then this guide is for you!

I personally use Google Drive for almost all my files. My photos, documents, spreadsheets and everything else go in there. I also run multiple WordPress websites, therefore it is convenient for me to be able to import by Google Drive media into the WordPress media library as I create posts and pages. It saves me time and effort.

Import Google Drive files into the WordPress media library with ease!

There are several ways to do this from what I can see and there are various WordPress plugins for Google Drive but I’ll show you my way using a specific plugin which I’ve tested and used over and over again.

Using Google Drive with WordPress

Follow these instructions to use Google Drive in WordPress media library:

1. Install the External Media plugin

Install the External Media plugin

First and foremost, you need to login to your WordPress dashboard and go to Plugins > Add New to install a new plugin.

Search for “external media” plugin and install the External Media plugin by Minnur Yunusov.

Once you’ve clicked the Install Now button, wait for it to install then click the blue Activate button to activate it.

2. Get Google Developers API OAuth Client ID

Go to the Google Developers console to get an OAuth client ID.

Get Google OAuth Client ID

To do this, go to Credentials in the sidebar and click on Create Credentials and choose OAuth Client ID. Go ahead and follow the Configure Consent Screen button, fill in all the values correctly and when you’re done, click the Save button.

On the next screen, choose Web Application and fill in your hostname/domain name and for the redirect URL, get that under Settings > External Media in your WordPress dashboard at the very bottom. So paste that then click the Create button.

Google OAuth Redirect URL

Then copy the newly created client ID to your clipboard which will be used in step 3 below.

Google OAuth Client ID

3. Configure External Media plugin Google Drive

With the plugin installed and activated, go to Settings > External Media in the WordPress dashboard.

Then tick/check the Enable this plugin checkbox at the top to start using Google Drive with WordPress.

Scroll down a bit and paste the Client ID you copied in step 2 above from Google developers console. For the Application ID field – as it says there – just use the first few numbers in the Client ID and that’s all.

Go ahead and configure the rest of the settings as needed and click Save Changes at the bottom to complete.

I suggest that you untick/uncheck the Filter checkbox since that will cause Google Drive to only show starred items/documents.

4. Import Google Drive Files into WordPress

To start importing, go to Posts > Add New to create a new post or go and edit an existing post, page or custom post.

Import From Google Drive

On the post editing screen, click on the Add Media button just above the editor and select the Upload Files tab at the top. You will now see a button that says Import From Google Drive. Click on that to authenticate and start using the Google Drive files in your WordPress media library.

Import Google Drive Files into WordPress

You can select a single or multiple Google Drive files as needed.

Video of Using Google Drive With WordPress Media Library

Beautiful Newsletter Templates

Professional newsletter templates that are fully responsive for desktop, tablet, and mobile. They are 100% cross-client compatible.

See Them
  1. Maryjane on March 20, 2018

    Is the “authorized JavaScript origins” our domain address? I did everything and when I try to import it says the JavaScript origin in the request does not match the ones authorized for Oauth client. Help!

  2. vinay on January 1, 2018

    I am facing a 402 error after applying all the steps, please suggest me how can i resolve the error

  3. Peter on November 15, 2017

    Hi, really nice and helpful post:)
    That really sucks that the files are downloaded to the website. No link to google drive?
    Just keep using


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Save 15% On All Purchases

Use this amazing, limited offer and SAVE BIG! Buy any of our WordPress plugins, extension plugins or newsletter templates.

Save 15% On All Purchases

You have Successfully Subscribed!

Pin It on Pinterest