Overview
The Google Drive add-on allows you to attach and serve files directly from Google Drive. Use your existing Drive storage, share files across team members, and leverage Google’s infrastructure for reliable file delivery.
Prerequisites
- WordPress Download Manager installed
- Google Drive add-on installed and activated
- Google account
- Google Cloud Console access
Benefits
| Feature | Benefit |
|---|---|
| 15GB Free | Generous free storage |
| Familiar Interface | Easy file management |
| Team Sharing | Collaborate with shared drives |
| Google Infrastructure | Fast, reliable delivery |
| Version History | Automatic file versioning |
Google Cloud Setup
Step 1: Create Project
- Go to console.cloud.google.com
- Click Select a project > New Project
- Enter project name (e.g., “WPDM Integration”)
- Click Create
Step 2: Enable Drive API
- Go to APIs & Services > Library
- Search for “Google Drive API”
- Click Google Drive API
- Click Enable
Step 3: Create OAuth Credentials
- Go to APIs & Services > Credentials
- Click Create Credentials > OAuth client ID
- If prompted, configure consent screen first:
OAuth Consent Screen: ├─ User Type: External ├─ App name: Your Site Name ├─ User support email: your@email.com ├─ Developer contact: your@email.com └─ Scopes: ../auth/drive.readonly (or full access)
- Create OAuth Client ID:
Application type: Web application Name: WPDM Google Drive Authorized redirect URIs: https://yoursite.com/wp-admin/admin.php?page=wpdm-google-drive-callback
- Copy Client ID and Client Secret
Step 4: Get Credentials
┌─────────────────────────────────────────────────────────────┐ │ OAuth 2.0 Client IDs │ ├─────────────────────────────────────────────────────────────┤ │ Name: WPDM Google Drive │ │ Client ID: 123456789-abc...apps.googleusercontent.com │ │ Client Secret: GOCSPX-abc123... │ └─────────────────────────────────────────────────────────────┘
Plugin Configuration
Step 1: Access Settings
- Go to Downloads > Settings
- Click Google Drive tab
Step 2: Enter Credentials
┌─────────────────────────────────────────────────────────────┐ │ Google Drive Configuration │ ├─────────────────────────────────────────────────────────────┤ │ │ │ Client ID: │ │ [123456789-abc...apps.googleusercontent.com ] │ │ │ │ Client Secret: │ │ [GOCSPX-abc123... ] │ │ │ │ [Save Settings] │ │ │ │ [Authorize with Google] │ │ │ └─────────────────────────────────────────────────────────────┘
Step 3: Authorize
- Click Authorize with Google
- Select Google account
- Grant permissions
- Redirected back to WordPress
✓ Successfully connected to Google Drive Account: your-email@gmail.com
Using Google Drive Files
Adding Files to Package
- Edit a package
- In Attached Files, click Browse Google Drive
- Navigate to your files
- Select file(s)
- Click Attach Selected
┌─────────────────────────────────────────────────────────────┐ │ Google Drive Browser │ ├─────────────────────────────────────────────────────────────┤ │ 📁 My Drive │ │ ├── 📁 Downloads │ │ │ ├── 📄 software-v2.0.zip (45 MB) [Select] │ │ │ └── 📄 user-manual.pdf (5 MB) [Select] │ │ ├── 📁 Shared with me │ │ │ └── 📄 team-template.zip (12 MB) [Select] │ │ └── 📄 readme.txt (2 KB) [Select] │ │ │ │ [Attach Selected Files] │ └─────────────────────────────────────────────────────────────┘
File Reference Format
Files stored as Google Drive file ID:
gdrive://1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms
Shared Drives
Access team/shared drives:
- In Drive browser, click Shared Drives
- Select shared drive
- Browse and attach files
Download Methods
Direct Download
Files downloaded directly from Google:
☑ Direct download from Google Drive
Pros:
- Fast delivery
- No server bandwidth used
Cons:
- Less control over access
- May expose Drive file ID
Proxy Download
Route through WordPress:
☑ Proxy downloads through server
Pros:
- Full access control
- Works with all locks
- Accurate tracking
Cons:
- Uses server bandwidth
- Slower for large files
API Download
Use Google Drive API:
☑ Use API for downloads
Pros:
- Secure access
- Supports private files
- Better rate limits
File Permissions
Public Files
For files anyone can download:
- In Google Drive, right-click file
- Click Share
- Change to “Anyone with the link”
- Copy link
Private Files (via API)
Keep files private, use API access:
- File remains private in Drive
- WPDM uses API credentials
- Download served through plugin
Shared with Specific Users
Share with your service account:
- Share file with service account email
- WPDM accesses via service account
Service Account (Alternative)
When to Use
- Server-to-server access
- No user authorization needed
- Automated processes
Creating Service Account
- Go to IAM & Admin > Service Accounts
- Click Create Service Account
- Enter name and description
- Grant Drive API access
- Create and download key (JSON)
Configuration
┌─────────────────────────────────────────────────────────────┐ │ Service Account Configuration │ ├─────────────────────────────────────────────────────────────┤ │ ☑ Use Service Account │ │ │ │ Service Account Email: │ │ [wpdm@project-id.iam.gserviceaccount.com ] │ │ │ │ JSON Key File: │ │ [Upload JSON key file] │ │ │ └─────────────────────────────────────────────────────────────┘
Storage Quotas
Google Drive Limits
| Account Type | Storage |
|---|---|
| Free | 15 GB (shared with Gmail, Photos) |
| Google One 100GB | 100 GB |
| Google One 200GB | 200 GB |
| Google One 2TB | 2 TB |
| Workspace Starter | 30 GB |
| Workspace Business | 2 TB+ |
API Quotas
| Quota | Limit |
|---|---|
| Queries per day | 1,000,000,000 |
| Queries per 100 seconds | 20,000 |
| Queries per 100 seconds per user | 100 |
Folder Organization
Recommended Structure
My Drive/
├── WPDM Downloads/
│ ├── Software/
│ │ ├── Current/
│ │ └── Archive/
│ ├── Documents/
│ │ ├── Manuals/
│ │ └── Guides/
│ └── Templates/
├── Shared/
│ └── Team Files/
└── Private/
└── License Files/
Using Folders in WPDM
Set default folder:
Default Folder ID: [1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms] (Find folder ID in Drive URL)
Troubleshooting
“Authorization Failed”
Causes:
- Wrong credentials
- Redirect URI mismatch
- Consent screen not configured
Solutions:
- Verify Client ID/Secret
- Check redirect URI matches exactly
- Complete consent screen setup
- Re-authorize
“File Not Found”
Causes:
- File deleted from Drive
- Permissions changed
- Wrong file ID
Solutions:
- Verify file exists in Drive
- Check sharing settings
- Re-attach file
“Quota Exceeded”
Causes:
- Too many requests
- Large traffic spike
Solutions:
- Enable caching
- Use proxy downloads
- Request quota increase
“Access Denied”
Causes:
- File not shared
- Token expired
- Wrong account
Solutions:
- Share file appropriately
- Re-authorize connection
- Check connected account
Best Practices
- Organize files – Use clear folder structure
- Use shared drives – For team collaboration
- Monitor quotas – Track API usage
- Enable caching – Reduce API calls
- Backup important files – Don’t rely solely on Drive
- Regular authorization check – Ensure token is valid
Comparison with Other Storage
| Feature | Google Drive | S3 | Dropbox |
|---|---|---|---|
| Free Storage | 15 GB | None | 2 GB |
| Max File Size | 5 TB | 5 TB | 2 GB (free) |
| CDN | No (use proxy) | CloudFront | No |
| Team Sharing | Yes | IAM | Yes |
| API Limits | Generous | Pay per use | Moderate |
Related Documentation
Last updated: January 2026
Applies to: WordPress Download Manager 7.x + Google Drive Add-on