Newest Posts
Home / Wordpress Plugins / How to Connect Google Drive to WordPress Media Library

How to Connect Google Drive to WordPress Media Library

Hello, and welcome to my today’s post. Most people use Google Drive as their online Cloud Storage provider these days because is very trustworthy and most importantly, it gives away FREE 15GB of online Cloud Storage. So most people are addicted to Google drive because of it’s Features. Most People download the files in their Drive and re-upload into their WordPress website, when they need to insert and attachment or even an image. Don’t Be too silly on that matter now. Today I’m not going to present you an article on Google drive. Instead of it, I will present you and article on How to Connect Google Drive to WordPress Media Library. It is simple as that if you connect your Drive to WordPress, when attaching your files to WordPress Posts.

This simple thing can be achieved by a tiny plugin installation. It is “Google Drive WP Media.” I will show you step by step on How to Connect Google Drive to WordPress Media Library using this Plugin. It is an free Plugin as well as it is very powerful. First of all You need to install the plugin and activate it. Install it by downloading it here. Google Drive WP Media. After Activating the plugin you need to setup it’s settings to start working the plugin properly. Now is the time that you will be get little hesitated. Because it is a little difficult task. Don’t get shocked, because I will guide you step by step on How To Connect Google Drive to WordPress Media Library.

Navigate to Media> Google Drive WP Media from your site’s Dashboard. Go to it’s Settings Tab. It will look like this.

It Requests you and Google Email, Client ID, Service Account Name, Private Key URL Path. Just don’t be hesitated and we will look How to find these four items to be filled in these fields.

Go to https://code.google.com/apis/console/  and create a New Project. Give it’s name as your wish. The Account Creating Process will take a while and the progress will be shown in the box at the Bottom Right corner of the Screen. After it finishes the Account Creation Process, Navigate to APIs under the APIs and Auth menu. Choose Google Drive API From it and enable it.

After Enabling it, Navigate to Credentials. And Click on “Create New Client ID”. Choose “Service Account” from the 3 options given in the list.

After Creating an ID, a file will be downloaded automatically. Keep it securely. If he Downloaded file is an  JSON file, you will have to ignore that downloaded file and again Go to the Credentials section under the APIs and Auth Section. You have to Download a .P12 file in order to complete this process successfully. Click on the button that says Generate a new .P12 File.  A file will be downloaded automatically again. save it carefully on a secure place.

After that, you need to host that file on your web server or in Google Drive. If you host that file on you server, you must keep the URL of it as safe. We will need it. If you want to host it in Google Drive, Just upload it and change it’s Permission as Public. (Right click on that file and click Share. After that, Click Advance and select Public as the Permission) after that copy it’s sharing URL. It will look like this.

https://drive.google.com/file/d/0B33LMPq2jtxwUGJlMFRUbEh5ZzQ/view?usp=sharing

You need to change the URL as like this. https://www.googledrive.com/host/”file ID”. You need to replace the file ID of your file with “file ID” in this URL. Now it will look like this.

https://www.googledrive.com/host/0B33LMPq2jtxwUGJlMFRUbEh5ZzQ

Save this URL in a notepad. It will be needed to us.

Now just Go to the Plugin’s Settings Page as Said above. You need the information on the Google API Screen.

Just fill the fields as shown in the image below.

Click Save button in the Settings Page. There will be an ‘Successful’ message after you click save.

After that You will have to create a folder to manage files with the plguin. The plugin will prompt and option to select or create a folder for that.

You can insert files in to your posts by just using an easy shortcode. These are the Shortcodes Available in this Plugin.

Shortcode: [gdwpm id="GOOGLE-DRIVE-FILE-ID"]
Shortcode with specific width & height: [gdwpm id="GOOGLE-DRIVE-FILE-ID" w="600" h="700"]
Shortcode for embed video: [gdwpm id="GOOGLE-DRIVE-FILE-ID" video="manual" w="600" h="370"]

OR just you can insert your files in Google Drive by just clicking the button on the top of the WordPress Editor. It will Browse your Folder in the Google Drive. That’s All you need to do to Connect Google Drive to WordPress Media Library. And this concludes the today’s post. Hope You’ve enjoyed it. Cheers!!!

Comments

comments

About TricksLK Author

Harindu Perera is still a student who is doinng his A/Ls. He is interested in the field of Web Developing and designing. Also he is interested in developing sites with wordpress. He also likes blogging. He is the CEO and the Founder of TricksLK.com. You can contact him via his social profiles.

Leave a Reply

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

*

Optimization WordPress Plugins & Solutions by W3 EDGE