Why Connect Google Drive to Your WordPress Media Library?
Google Drive is one of the most usable cloud storage services that allow you to store your data online. It offers 15GB of free cloud storage to all Google account users(personal accounts).
One use case for this could be you creating your online photo gallery site. If your site is in WordPress, you can directly access all your photos directly from google drive instead of uploading them to your WordPress. This drive can also be connected to your phone, hence you will have all your phone pictures at your disposal for your WordPress site.
Another use case could be of creating a Woo-Commerce site. In this case, you can connect the drive for an easy list of images for category-wise uploads. This just adds to the overall convenience of using high-quality pictures easily.
This not just provides you pictures easily at your disposal, whenever you need, but also helps with tackling a major data storage problem of maintaining all media on your WordPress instance. You can store all the images & documents on the Cloud Service like Google Drive, One Drive, URL, DropBox.
Now, We have to connect your Google Drive to your WordPress media library, and we should be able to import the files to the WordPress website and use them in posts or pages, and thus considerably reducing the loading time.
How to Connect Your WordPress Media Library to Google Drive?
External Media Plugin to rescue: Installation & Activation
You can search for the plugin by following the below steps or can click here for easy access:
- Go to the dashboard >Left Panel Plugins > Add NEW
- In Search Tab Enter External Media & Then install the plugin.
- Active the plugin for importing files from third-party services into WordPress Media Library (Dropbox, Box, OneDrive, Google Drive).
- Go to the Dashboard > Settings > External Media > Choose the Google Drive option and click on the Enable this Plugin checkbox.
- Now, We should add the Client ID and Application ID.
For this, go to Google Developers Console and create a new project and enable it’s API Key. You can also use your old API key, if you already have a project. - Here, we are choosing an old project i.e. WP Media – Google Drive.
- After successfully creating that, you get to see the dashboard.
- Then Go to Credentials > Create Credentials > OAuth Client ID.
- After selecting it, choose the web application as an application type and give an appropriate name.
- Followed by giving the URI for the website that you’d like to connect to Google drive. In our case, it is this.
- You will also have to create an authorized Redirect URL by going to External Media > choose Google Drive and Last Option Redirect URL.
- Copy the Redirect URL from WordPress and paste it on the console as an Authorized URI, followed by clicking on the CREATE Button.
- Once created, it displays Oauth 2.0 Client Ids and we can download it as a JSON file. This client Id and Application Id information will be added in the External Media Google Drive’s setting.
- Now go to the External Media > Google Drive and add that Client ID. The First 12 digits of your Client Id will become your Application Id and save the changes.
- You are almost there now. You can go to the Dashboard > Pages or Posts > Add New and click on the media to upload the files, and you will see the import from the Google Drive Option.
- Clicking this button will ask you to log in to your Gmail/Google Drive account from where you can successfully import the files.
0 Comments