Do you want to connect Google Drive to your WordPress media library?
After making this connection, you can access all your Google Drive images, photos, and files directly from the WordPress dashboard. This can save you time and effort and is also a great way to share files with other WordPress users without sharing your Google password.
In this article, we will show you how to connect Google Drive to your WordPress media library.
Why Connect Google Drive to Your WordPress Media Library?
Google Drive is one of the most popular free Google tools and is a great way to store and share all kinds of files, including images.
If you regularly upload images to Google Drive, then you can save time and effort by connecting your Google Drive account to the WordPress media library.
You can then access any image in your Google Drive account directly from the WordPress dashboard.
With this integration in place, you can add Google Drive images to any page or post with the click of a button.
If you share the WordPress dashboard with other people, then connecting Google Drive to WordPress allows you to share images and files without sharing your Google password. This helps to keep your Google account safe and makes it easier to lock people out of your Google Drive when they no longer need access.
That said, let’s see how you can connect Google Drive to your WordPress media library.
How to Connect Google Drive to Your WordPress Media Library
The easiest way to connect Google Drive to WordPress is by using the JoomUnited WP Media Folder Cloud Addon Google Drive Integration.
This plugin and addon allow you to access Google Drive files from the WordPress media library. You can also create folders and organize the files inside your Google account.
Set Up the WP Media Folder Plugin
Upon activation, you will see the setup wizard. To get started, click on the ‘Continue to environment check’ button.
After a few moments, WP Media Folder will show some information about your WordPress environment, such as its PHP version and extensions.
To carry on, click the ‘Continue’ button.
You can now choose whether to disable the gallery and lightbox features.
These features allow you to create, edit, and delete folders inside the WordPress media library, so we recommend leaving them enabled.
With that done, click on the ‘Continue’ button.
You’ll now see some extra features you may want to use. The default settings should work well for most WordPress websites, but you can enable the additional features using their toggles.
For example, if you are using a WordPress page builder, then you may want to enable the ‘WP Media Folder on frontend’ feature.
When you are happy with the settings, click on ‘Continue’.
After a few moments, you will see the following message: ‘You have now completed the plugin quick configuration.’
When you are ready, click the ‘Go to Media Library’ button.
Install the WP Media Folder Cloud Addon
WP Media Folder has an automatic connector that allows you to link WordPress to Google Drive without creating a project in the Google Cloud Console. For that reason, we recommend using the automatic connector.
However, if you can’t use the connector, then we show you how to connect to Google Drive manually at the end of this guide.
To connect Google Drive to your WordPress media library, you need to go to Settings » General.
Here, scroll to the ‘Joomunited live updates’ section.
Then, click on ‘Link my Joomunited account.’
In the popup that appears, type in the email and password for your JoomUnited account.
After that, simply click on ‘Log in’.
Now, you are ready to connect Google Drive to your WordPress blog.
Simply go to Settings » WP Media Folder to get started.
In the left-hand menu, select ‘Cloud’ and ‘Google Drive’.
Here, simply click on ‘Automatic’.
You can now go ahead and click on the ‘Connect Google Drive’ button.
How to Organize Your Google Drive Images
Now you are connected to Google Drive, you can access and organize your files directly in the WordPress dashboard.
Simply go to Media » Library and select the new Google Drive option in the left-hand menu.
You can now browse through all the images in your Google Drive.
You can also filter and sort these images or show more file types using the row of buttons in the toolbar.
You can also create new folders to manage your images. Any changes you make in the WordPress dashboard will be synchronized to the connected Google Drive account automatically. This way, users can organize and manage images even if they don’t have direct access to the connected Google account.
To start, you can create a new folder by clicking on the ‘Add New Folder’ button.
In the popup that appears, type in a name for the folder.
Then, just click on ‘Create’.
This creates a new folder under the Google Drive parent folder.
To add images to the folder, click on the ‘Add New’ button and then select a file from your local computer. This image will be added to both the WordPress media library and your Google Drive account.
If you have been running your WordPress website for a while, then you may already have lots of images in the media library. In this case, you can easily back up your WordPress content to Google Drive by uploading these files to your Google account.
To do this, simply select ‘Media Library’.
Then, find the image that you want to upload to Google Drive.
You can either drag and drop the image into the parent Google Drive folder or any sub-folder you have created.
Simply repeat these steps to organize the WordPress files in your media library.
Add Google Drive Images to Your WordPress Website
You can now easily add any Google Drive image to your WordPress pages and posts. To do this, simply add an Image block in the WordPress content editor and then click on the ‘Media Library’ button.
In the WordPress media library, either select ‘Google Drive’ or choose any Google Drive folder.
You will now see all the media files that you can add.
Simply click on the file you want to use.
When you are ready, just click on the ‘Select’ button. WP Media Folder will now add the image to your WordPress page or post.
Manually Connect Google Drive to Your WordPress Media Library
If you don’t want to use WP Media Folder’s automatic connector, then you can connect to Google Drive manually in the Google Cloud Console.
Create a Google Cloud Project
To get started, head over to the Google Cloud Console. If this is your first time visiting the console, then you will need to accept the terms and conditions and choose whether you want to get email updates.
With that done, click on ‘Agree and Continue’.
This takes you to the Google Cloud Console.
You will need to create a new project, so click on ‘Select a project’.
In the popup that appears, select ‘New Project’.
You can now type in a name for the project. This is just for your reference, so you can use anything you want.
On this screen, you can also add an optional organization and change the location where Google Cloud Console will create your project.
When you are happy with the information you have entered, go ahead and click on ‘Create’.
Enable the Google Drive API
After that, select ‘Enabled APIs & Services’ from the left-hand menu and then click ‘Enable APIs and Services’.
This screen shows all the different APIs you can enable. For example, you can show the latest videos from your YouTube channel by enabling the YouTube Data API or add a Google Calendar in WordPress using the Calendar API.
To connect Google Drive to WordPress, scroll to the ‘Google Workspace’ section and click on ‘Google Drive API’.
This takes you to a screen where you can activate the key that WordPress will use to access your Google Drive.
Simply go ahead and click the ‘Enable’ button.
Create an OAuth 2.0 Client ID
With that done, open the menu by clicking the line icon in the top left corner.
Then, select ‘APIs & Services’, followed by ‘Credentials’.
Here, you need to click on ‘Create Credentials’.
In the dropdown menu, you must select ‘OAuth client ID’.
On the next screen, click the ‘Configure Consent Screen’ button.
You can now choose whether to create an internal or external app. If you select ‘Internal’, then only G Suite users within your organization will be able to access the app. If you select ‘External’, then your app will be available to anyone with a Google account.
After making your decision, you can click on ‘Create’.
Now, you will need to type in some information about the Google app and add your business email address.
You will also need to type in the domain name where you plan to use the application.
After completing this form, click the ‘Save and Continue’ button.
You can now specify the content that the app will be able to access and the actions it can perform by adding scopes. To see all the different Google Drive scopes, just click on the ‘Add or remove scopes’ button.
To add a scope to your project, simply check its box.
Just be aware that Google will review any scopes that are marked sensitive.
After adding all the scopes you want to use, you need to click on ‘Update’.
To move to the next screen, click ‘Save and continue’.
At this point, you may want to enter some more information about your app, including how you plan to use the application.
This step is optional, but it may help Google to verify and approve your project more quickly.
When you are ready to move on, just click the ‘Save and continue’ button. Google will now show a summary of all the information you have entered.
Next, open the menu by clicking on the line icon and then select ‘oAuth Consent Screen’.
You will see that your app is currently in test mode.
To make it live, go ahead and click ‘Publish App’.
After reading this information, just click on the ‘Confirm’ button.
Add the Client ID and Client Secret to WordPress
With that done, you are ready to create the client ID and secret key.
In the left-hand menu, select ‘Credentials’.
Then, click on ‘Create Credentials’.
In the dropdown that appears, you need to select ‘OAuth client ID’.
On the next screen, open the dropdown menu and select ‘Web application’.
You can now type in a name for your OAuth 2.0 client. This is just for your reference, so you can use anything you want.
In the field, type in your website’s domain name.
Under ‘Authorised redirect URIs,’ add the following URL, making sure to replace ‘https://your-domain.com’ with your own domain name:
With that done, scroll to the bottom of the screen and click on ‘Create’.
After a few moments, Google will show your client ID and client secret in a popup. You will need this information, so make a note of it somewhere safe.
You can also download the information as a JSON file.
To add the client ID and client secret to WordPress, go to Settings » WP Media Folder in the WordPress dashboard.
In the left-hand menu, select ‘Cloud’ followed by ‘Google Drive’.
Then, you need to select ‘Manual’.
With that done, simply paste the client ID and client secret into the ‘Google Client ID’ and ‘Google Client Secret’ fields.
Now, click on ‘Connect to Google Drive’.
In the popup that appears, select the Google Drive account that you want to use.
You will now see some information about all the data the app will be able to access and the tasks it can perform. Simply check the box next to each permission the app is requesting.
Then, click on ‘Continue’.
Finally, click on the ‘Save Changes’ button.
You’ve now successfully connected Google Drive to your WordPress media library.
We hope this article helped you learn how to connect Google Drive to your WordPress media library. You may also want to see our guide on how to create automated workflows in WordPress or see our expert pick of the best analytics solutions for WordPress users.