Using your own Google App is optional. For a quick setup, just use the plugin's built-in App. Your own App is worth the effort if you want your own API quota (the default App's quota is shared with all other users of the plugin), your own usage statistics in the Google Cloud Console, and your own app name on the Google consent screen.
Setup takes about 10 minutes.
1: Create a project
- Go to the Google Cloud Console and sign in.
- Click the project selector at the top and choose New project.
- Give it a name (e.g. WordPress Google Drive). Leave Location at No organization if you don't have one. Click Create.
- Important: open the project selector again and make sure your new project is selected. Everything after this is stored per project.
2: Create a Project and Enable the Drive API
- Open ☰ → APIs & Services → Library.
- Search for Google Drive API, open it, click Enable.
3: Configure the Google Auth Platform
- Open ☰ → Google Auth Platform → Overview. If you see Google Auth Platform not configured yet, click Get started.
- App information – enter an App name and pick a User support email. Do not upload a logo; a logo triggers Google's brand verification.
- Audience – choose External. (Internal only exists for projects inside a Google Workspace organisation.)
- Contact information – enter your email address.
- Finish – tick I agree to the Google API Services: User Data Policy and click Create.
- Go to Branding → Authorized domains → Add domain and enter your site's domain (e.g.
example.com, withouthttps://orwww.). -
Go to Data Access → Add or remove scopes. Add the Drive scope that matches the setting you use in the plugin:Plugin settingScope to addGoogle's classificationWhat you'll notice
drive.file.../auth/drive.fileNon-sensitiveNo "unverified app" warning when you connectdrive.readonly.../auth/drive.readonlyRestricted"Unverified app" warning when you connectdrive.../auth/driveRestricted"Unverified app" warning when you connectAdd
.../auth/userinfo.emailand.../auth/userinfo.profileas well if the plugin's settings page lists them. Click Update, then Save.
- Go to Audience → click Publish app → confirm. Your app status changes to In production. This is required for all three scopes. See Notice 1.
4: Create the OAuth client
- Go to Google Auth Platform → Clients → Create client.
- Application type: Web application.
- Name: anything — this is an internal label only.
- Under Authorized redirect URIs, click Add URI and paste the OAuth 2.0 Redirect URI shown on the plugin's settings page. It must match character for character.
- Click Create.
- Copy the Client ID and Client secret now, or click Download JSON. Google shows the secret only once. If you lose it, open the client and create a new secret — you cannot look the old one up. See Notice 2.
5: Configure the plugin
- Paste the Client ID and Client secret on the plugin's settings page in WordPress.
- Save, then click Authorize / Connect and pick your Google account.
- If you use the
drive.readonlyordrivescope, Google shows an unverified app warning, because your app hasn't been through Google's verification. Click Advanced → Go to … (unsafe) → Continue. This does not affect how the plugin works. Withdrive.fileyou won't see this screen.
Done. The plugin now runs on your own Google App.
Notice 1 — publish the app, or your connection breaks after 7 days. While the app is in Testing, authorizations by a test user expire seven days from the time of consent, and the refresh token expires with them. This applies to all three Drive scopes, including drive.file. Publishing to In production prevents it. (Google: Manage App Audience)
Notice 2 — the client secret is shown only once. You can only view and download the full client secret at the moment you create the client. Lost it? Open the client and add a new secret; a client can hold two at most. (Google: Manage OAuth Clients)
Notice 3 — unverified apps have a 100-account limit. With drive.readonly or drive, a maximum of 100 Google accounts can ever authorise your unverified app. Connecting one or a few accounts is no problem. (Google: Manage App Audience)
Notice 4 — unused clients are deleted. OAuth clients with no activity for 6 months are automatically deleted. Google notifies you first, and you can restore a deleted client for up to 30 days. (Google Developers Blog)