---
title: "Quick Start: Google Cloud Storage"
url: "https://dudlewebs.com/guideline/media-cloud-sync/storage-providers/quick-start-google-cloud-storage/"
markdown_url: "https://dudlewebs.com/guideline/media-cloud-sync/storage-providers/quick-start-google-cloud-storage.md"
type: "Docs"
language: "en-US"
date_published: "2026-11-08T09:57:25+00:00"
date_modified: "2026-11-08T15:13:41+00:00"
---

# Quick Start: Google Cloud Storage

This guide shows you how to offload your WordPress media to Google Cloud Storage (GCS) with Media Cloud Sync.

**You’ll need:** a Google Cloud project with billing enabled, and Media Cloud Sync installed and activated.

## Step 1: Create a service account

Media Cloud Sync authenticates with a **service account JSON key**.

1. Open the [Google Cloud Console](https://console.cloud.google.com/) and select your project.
2. Go to **IAM & Admin → Service Accounts** and click **Create service account**.
3. Enter a name, for example `media-cloud-sync`, and click **Create and continue**.
4. Under **Grant this service account access to project**, add the role **Storage Admin**, then click **Continue → Done**.

> **Why Storage Admin?** The plugin lists and creates buckets, sets bucket access (public access and Managed Folders for Private Media `PRO`), and uploads and deletes objects. Storage Admin covers all of this.

To limit the account to one bucket, see [Provider Permissions](https://dudlewebs.com/guideline/media-cloud-sync/storage-providers/provider-permissions/#google-cloud-storage).

## Step 2: Download the JSON key

1. Open the service account and go to the **Keys** tab.
2. Click **Add key → Create new key**, choose **JSON**, and click **Create**.
3. A `.json` file downloads. Keep it safe; it’s the only copy.

> If your organization blocks key creation (the `iam.disableServiceAccountKeyCreation` policy), ask your Google Cloud admin to allow it for this project.

## Step 3: Set up the bucket

**Easiest:** let the plugin create the bucket in the wizard. It turns on uniform access and makes the bucket publicly readable for you.

**To use your own bucket:**

1. Go to **Cloud Storage → Buckets → Create**, or open your existing bucket.
2. Enter a globally unique name and choose a **location** (region, dual-region, or multi-region).
3. Under **Choose how to control access to objects**:
   - **Untick “Enforce public access prevention on this bucket”** if files will be served straight from GCS.
   - Choose **Uniform** access control.
4. Click **Create**.
5. **If files will be served straight from GCS, make them readable.** Open the bucket’s **Permissions** tab and click **Grant access**. Add the principal `allUsers` with the role **Storage Object Viewer**, and confirm. See Google’s [Make data public](https://docs.cloud.google.com/storage/docs/access-control/making-data-public).

Or with the `gcloud` command line:

```bash
gcloud storage buckets add-iam-policy-binding gs://my-bucket --member=allUsers --role=roles/storage.objectViewer
```

> **Note:** This role also lets anyone list the bucket’s files. Google suggests a bucket used only for public files.

## Step 4: Connect Media Cloud Sync

1. Go to **Media Cloud Sync → Dashboard**, click **Configure**, then **Get started**.
2. Select **Google Cloud Storage** and click **Next**.
3. Choose where to keep your credentials:
   - **Use wp-config.php Constant** *(recommended)*: paste the whole JSON key as a **single-line string**:`define( 'WPMCS_CONFIG', [ 'config_json' => '{"type":"service_account","project_id":"…","private_key":"…", …}', ] );` The JSON contains double quotes, so wrap it in **single quotes** as shown. Keep the `\n` sequences inside `private_key` exactly as they are in the file.
   - **Store in Database**: upload the `.json` file or paste its contents into **JSON Config File**.

![](https://dudlewebs.com/wp-content/uploads/2026/11/gcs-04-credentials-1024x882.png)

4. Click **Verify credentials**.

## Step 5: Choose or create the bucket

- **Use existing Bucket**: use **Select from list**, or **Enter manually** to type the name.
- **Create new Bucket**: enter a bucket name and choose a **region**. The plugin creates the bucket.

Bucket names can’t start with `goog` or contain `google`.

![](https://dudlewebs.com/wp-content/uploads/2026/11/gcs-05-bucket-1024x882.png)

Click **Verify bucket** to run the read, write, and delete permission checks.

## Step 6: Bucket security

**Block All Public Access** turns on GCS *Public Access Prevention* for the bucket.

- Keep it **off** if visitors load media straight from GCS. With it on, no file in the bucket can be publicly viewed.
- Don’t turn it on together with **Private Media** `PRO`, because it also blocks the public files that feature relies on.

![](https://dudlewebs.com/wp-content/uploads/2026/11/gcs-06-security-1024x882.png)

Click **Next**, then **Save and continue**.

## Step 7: Choose how media is delivered

- **Google Cloud Storage**: serve from `https://storage.googleapis.com/your-bucket/...`.
- **A CDN or Other**: enter your CDN or custom domain under **Use Custom Domain Name (CNAME)**.

![](https://dudlewebs.com/wp-content/uploads/2026/11/gcs-07-delivery-1024x882.png)

Click **Finish setup**, then use **Recheck** on the **Delivery** card in Settings to confirm files can be read.

## Private Media on Google Cloud Storage `PRO`

On GCS, Private Media uses **Managed Folders** to keep your public base path readable while private files stay private. This needs:

- **Add Prefix to Bucket Path** turned on in Storage Settings (a base path is required).
- **Block All Public Access** turned off.

After enabling Private Media and saving, click **Apply Policy** on the **Delivery** card. Saving alone doesn’t change the bucket. Note that applying it removes public access from anything in the bucket **outside** the configured base path.

## Next steps

- [Storage Settings reference](https://dudlewebs.com/guideline/media-cloud-sync/settings/storage-settings-reference/)
- [Sync existing media](https://dudlewebs.com/guideline/media-cloud-sync/sync-and-maintenance/syncing-existing-media-to-the-cloud/)
- [Troubleshooting](https://dudlewebs.com/guideline/media-cloud-sync/sync-and-maintenance/troubleshooting-and-faq/)

[← Previous Quick Start: Amazon Web Services (AWS S3)](https://dudlewebs.com/guideline/media-cloud-sync/storage-providers/quick-start-amazon-web-services-aws-s3/) [Next → Quick Start: DigitalOcean Spaces](https://dudlewebs.com/guideline/media-cloud-sync/storage-providers/quick-start-digitalocean-spaces/)

Still need help?

[Chat with us Quick questions, answered live](https://dudlewebs.com/contact/) [Contact us Sales, partnerships or anything else](https://dudlewebs.com/contact/) [Create a ticket Technical issues with your site](https://dudlewebs.com/submit-ticket/)
