PluginsAppsPricingConsultingAboutBlog (opens andrewbaker.ninja in a new tab)Help Get in touch
👁28views

← CloudScale Plugin Help/CloudScale Backup & Restore, Free WordPress Backup Plugin with One-Click Restore & Cloud Sync

Google Drive

CloudScale Backup & Restore, Free WordPress Backup Plugin with One-Click Restore & Cloud Sync, Google Drive screenshot
On a phone
CloudScale Backup & Restore, Free WordPress Backup Plugin with One-Click Restore & Cloud Sync, Google Drive screenshot, as it appears on a mobile screen
The same panel at 390px, showing how it reflows. Cropped to the first screens.

The Google Drive Backup card uploads backup zips to Google Drive after every local backup. The plugin talks to the Google Drive API directly from PHP over a secure OAuth 2.0 connection, nothing has to be installed on the server. Setup takes about 10 minutes and only needs to be done once.

OAuth Client ID, the Client ID of the OAuth 2.0 Web application client you create in Google Cloud Console.

OAuth Client Secret, the secret shown alongside the Client ID. Keep this private.

Destination folder, path inside Google Drive where backups are uploaded. Trailing slash required (e.g. cloudscale-backups/). Leave blank for the Drive root.

Buttons on this card:

  • Save, saves the Client ID, Client Secret and destination folder.
  • Connect to Google Drive, opens Google’s authorisation page to link your account. Once connected the button becomes Disconnect, which clears the stored token so you can re-authorise (the credentials stay saved).
  • Test Connection, lists your Drive folder with the stored authorisation. A failure shows Google’s own error, for example an expired or revoked token.
  • Diagnose, shows OAuth client status, whether a refresh token is stored, the destination folder, backups synced and last-sync time.
  • Copy Last Backup to Google Drive, immediately uploads the most recent local backup zip, outside of any schedule. Does not create a new backup, it copies whatever zip is already on the server.

Before Copy Last Backup to Google Drive starts, the plugin checks how much free space Google Drive has:

  • If Drive has enough space, the sync starts immediately.
  • If Drive is running low, an inline warning appears showing MB free vs MB needed, with two options: Delete oldest (removes the oldest non-golden backup from Drive to make room, then starts the sync) or Sync anyway (proceeds regardless).

When connected, the card shows the destination folder, number of backups in Drive, and time of last sync.


Google Drive Setup Guide

Use a personal Gmail account for setup. Google Workspace / work accounts have organisation restrictions that can prevent creating the credentials this plugin needs.

Step 1, Create a Google Cloud project

Go to console.cloud.google.com and sign in. Click the project selector dropdown at the top of the page, then New Project. Set Organization to No organization, give the project any name (e.g. My Backups) and click Create. Make sure the new project is selected before continuing.

Step 2, Enable the Google Drive API

Go to APIs & Services → Library, search for Google Drive API, open it and click Enable. Shortcut: Google Drive API in the library.

Step 3, Configure the OAuth consent screen

Go to Google Auth Platform → Overview and click Get started if shown. Enter any app name and your Gmail as the support email, choose External as the audience, then continue through Data access (the plugin requests the Drive scope itself during the OAuth flow) and click Finish / Save. Your own Gmail is included as a test user automatically.

Step 4, Create OAuth 2.0 credentials

Go to Google Auth Platform → Clients (also reachable via APIs & Services → Credentials) and click + Create client. The application type must be Web application, Desktop app credentials cannot use the redirect URI this plugin needs.

Under Authorised redirect URIs click + Add URI and add this, with your own site’s address in front:

https://your-site.example/wp-admin/admin.php?page=cloudscale-backup&csbr_oauth=gdrive

Click Create. A dialog shows your Client ID and Client Secret, copy both now.

Step 5, Save credentials and connect

Paste the Client ID and Client Secret into the card, set a Destination folder (e.g. cloudscale-backups/) and click Save. Then click Connect to Google Drive, choose your Google account and click Continue. The plugin exchanges the code for a refresh token automatically and reloads the page.

Step 6, Verify and include it in cloud backups

Click Test Connection, you should see the number of backups found in your Drive folder. Then make sure Google Drive Backup is ticked under Include in cloud backup in Cloud Backup Settings and click that card’s Save. Uploads, including Copy Last Backup to Google Drive, are skipped until it is ticked and saved. A skipped upload says so: tick the provider under “Include in cloud backup” in Cloud Backup Settings and click Save, and check Test Connection passes.

redirect_uri_mismatch? The URI registered in Google Cloud Console does not exactly match the one the plugin sends. Open your client under Google Auth Platform → Clients and correct the Authorised redirect URI, including https vs http and any www. prefix.


Running out of Google Drive space

Google Drive free tier provides 15 GB shared across Drive, Gmail, and Photos. If your backups are large, you may run out of quota. The plugin detects this in two places:

  • Before a manual backup, the cloud space pre-check (see Create Local Backup Now) warns you and offers a Free space on Google Drive button.
  • Before a Copy Last Backup to Cloud sync, an inline warning appears on the card with Delete oldest and Sync anyway options.

The Delete oldest / Free space action removes the oldest non-golden backup from Google Drive one file at a time until the required space (plus a 15% buffer) is available. Golden images are never deleted automatically. If all deletable backups have been removed and there is still not enough space, you will need to free up quota manually in Google Drive, upgrade your Google One storage, or reduce your retention count.

Note: the plugin computes free space as total quota − used quota rather than trusting Google’s reported free field, which can be inaccurate when the account is over quota.

← Back to all sections