
4WP Drive is a WordPress plugin that syncs a Google Drive folder with your site: writers drop Google Docs into Drive, editors review them in an admin Inbox, and approved documents become WordPress draft posts — with front-matter field mapping, featured images, and server-side Google OAuth. No copy-paste, no third-party SaaS, no HTML cleanup.
Sync Google Drive to WordPress Without Copy-Paste
Most teams that write in Google Docs and publish on WordPress rely on manual copy-paste, “Publish to web” embeds, or a third-party conversion service. Each of these creates a problem: pasted content drags in messy inline styles and stray spans, embeds don’t create real posts, and SaaS converters send your documents through an external server before they ever reach WordPress.
4WP Drive takes a different approach. It connects directly to your own Google Drive account via OAuth, watches dedicated incoming/ and published/ subfolders, and converts each Google Doc into a clean WordPress draft — headings, lists, and bold/italic formatting preserved, with an optional featured image pulled from the same folder.
Who 4WP Drive Is For
- Editorial teams who draft content in Google Docs but publish on WordPress, and want a real review step before anything goes live
- Agencies running a shared Drive
incoming/folder across multiple writers and clients, with a single Inbox to approve or reject submissions - Content pipelines that need structured front-matter — title, slug, categories, tags, author, dates, and SEO fields — parsed straight from the document header
- Sites that require encrypted credential storage and server-side OAuth, with no Google API calls ever exposed to site visitors
How the Google Drive to WordPress Workflow Works
- Install and activate 4WP Drive on your WordPress site.
- Create Google OAuth credentials and connect your Drive account under Storage sources.
- Set your Drive root folder ID — the plugin uses
incoming/andpublished/subfolders automatically. - Drop a Google Doc (optionally with an image) into
incoming/, or trigger Sync manually. - Open the Inbox, preview the converted HTML, and choose Import as Draft or Reject.
- On import, the source file moves to
published/in Drive — so the incoming folder always reflects what’s still pending review.
Key Features
- Google Drive OAuth — connect an admin Google account; refresh and access tokens are stored encrypted in the WordPress database
- Automatic folder sync — scans
incoming/for new Google Docs and matching images - Admin Inbox — preview rendered HTML before deciding to import as draft or reject
- Document front-matter template —
Label: valuelines before a---or=====separator map directly to post fields; the rest becomes post content with headings, lists, and bold preserved
- Configurable field mapping — title, slug, categories, tags, author, dates, and SEO meta where supported
- Featured image import — pulled automatically from the same Drive subfolder as the document
- REST API and WP-CLI — run
wp forwp-drive syncfor scripted or scheduled syncs - Roadmap storage sources — GitHub Markdown/MDX and additional providers are planned for future releases
4WP Drive vs. Other Google Docs to WordPress Methods
There are several ways to get Google Docs content into WordPress — from manual copy-paste to Google Doc embed blocks to paid SaaS converters. Here’s how 4WP Drive compares for teams that need an editorial review step and want to keep document processing on their own server.
| Approach | Creates a real draft post | Editorial review step | Processing location | Cost |
|---|---|---|---|---|
| 4WP Drive | Yes | Yes — admin Inbox (approve / reject) | Your own server, via Google API | Free, self-hosted |
| Manual copy-paste | Yes | No (manual cleanup instead) | Browser clipboard | Free |
| Google Doc embed block | No — embeds the live document | No | Google-hosted (Publish to web) | Free |
| Mammoth .docx converter | Yes, from an uploaded .docx file | No | Your own server | Free |
| SaaS exporters (e.g. Wordable, GoPublish) | Yes, often with SEO plugin integrations | Varies by plan | Third-party SaaS servers | Free tier + paid plans |
The trade-off is straightforward: SaaS exporters add bulk publishing and built-in SEO plugin hooks, but route your documents through an external service. 4WP Drive keeps the whole pipeline — OAuth, document fetch, and conversion — inside your own WordPress install, with an explicit approve-or-reject step before anything becomes a draft.
Security, Privacy, and Google API Access
OAuth tokens and Google API credentials are stored encrypted in the WordPress database. Document content is fetched from Google Drive only when an administrator runs a sync, preview, or import — there is no visitor-facing tracking and no background polling that exposes credentials to the front end.
External Services Used
4WP Drive connects to Google only after an administrator configures OAuth and runs a sync or import.
- Google OAuth 2.0 — authorizes access to the connected account’s Drive files (scope:
drive); authorization and token endpoints run throughaccounts.google.comandoauth2.googleapis.com - Google Drive API — lists folders, exports Google Docs as HTML/DOCX, and moves files after import via
googleapis.com/drive/v3
All requests run server-side, triggered only by an administrator with the manage_options capability.
Installation
- Upload the plugin to
/wp-content/plugins/4wp-drive/, or install it directly from the Plugins screen. - Activate 4WP Drive.
- Open 4WP Drive → Storage sources (or the Documentation tab for the full setup guide).
- Paste your Client ID and Client Secret from Google Cloud Console, then click Save credentials.
- Click Connect Google Drive, enter your Drive root folder ID, and save your subfolder settings.
- Use the Inbox to preview and import documents as drafts.
Optional: define FORWP_DRIVE_GOOGLE_CLIENT_ID, FORWP_DRIVE_GOOGLE_CLIENT_SECRET, or FORWP_DRIVE_OAUTH_REDIRECT_URI as constants in wp-config.php to lock credentials outside the database.
Requirements
| WordPress version | 6.4 or higher |
| PHP version | 7.4 or higher |
| Tested up to | WordPress 7.0 |
| Current version | 1.0.1 |
| Requires a Google account | Yes, with Drive API enabled in Google Cloud Console |
Frequently Asked Questions
Do I need a Google Cloud project to use this plugin?
Yes. You’ll need to create OAuth 2.0 credentials (Web application type), enable the Google Drive API, and register the redirect URI shown in the plugin’s Documentation tab.
What document format does 4WP Drive support?
Google Docs placed in the incoming/ folder — either a single document or a subfolder containing a document plus an image. Front-matter lines (Label: value) before a separator paragraph (--- or a row of = characters) map to post fields; everything after the separator becomes the post body.
Are any API keys or Google credentials exposed to site visitors?
No. OAuth and Drive API requests run entirely on the server. Only administrators with the manage_options capability can connect Drive and import documents.
Can I store Google credentials in wp-config.php instead of the database?
Yes. Define the FORWP_DRIVE_GOOGLE_CLIENT_ID and FORWP_DRIVE_GOOGLE_CLIENT_SECRET constants in wp-config.php to keep them out of the database entirely.
Does 4WP Drive work on local development environments (.local / 127.0.0.1)?
Yes. If Google rejects your local site hostname, use the “OAuth redirect (local)” field and register the same loopback URI in Google Cloud Console.
How is 4WP Drive different from Google Doc embed blocks or “Publish to web”?
Embed blocks display a live Google Doc inside a post but don’t create real, editable WordPress content. 4WP Drive converts the document into an actual draft post — with its own title, slug, categories, and content — that an editor can review and publish like any other post.
More Plugins from 4wpdev
4WP Drive is part of a growing set of WordPress tools built by 4wpdev. See the full list of plugins on the 4wpdev WordPress.org profile.
Development and Contributing
4WP Drive is open source. The full PHP source is available in the public GitHub repository. The plugin ZIP includes a src/ directory with PSR-4 autoloading via src/Autoload.php when vendor/ is absent. There’s no npm build step — admin scripts ship as plain JavaScript in assets/.
Run the test suite with: composer install && composer test && composer run lint
“4WP” is our project brand name — “WP” appears only as part of that name and is not a reference to WordPress. This plugin is not affiliated with, endorsed, or sponsored by WordPress.
Ready to get started?
Check out the plugin on GitHub and start using it today.