Import Google Docs from Drive into WordPress drafts — editorial inbox, field mapping, and server-side OAuth.
4wp.dev · WordPress plugin · GPL-2.0-or-later
- Writers drop Google Docs (and optional images) into a Drive
incoming/folder. - 4WP Drive syncs new files and lists them in the admin Inbox.
- Editors Preview, Import as Draft, or Reject.
- Imported files move to
published/in Drive.
Front-matter lines before a separator (--- or =====) map to post fields (title, slug, categories, SEO, etc.). The rest becomes post content with headings, lists, and bold preserved.
- WordPress 6.4+
- PHP 7.4+
- Google Cloud project with Google Drive API enabled and OAuth 2.0 Web client credentials
- Activate the plugin.
- 4WP Drive → Storage sources — paste Client ID & Secret → Save credentials.
- Connect Google Drive (register the redirect URI from Documentation in Google Cloud Console).
- Set root folder ID → Save & create subfolders.
- Inbox → sync → import.
Optional wp-config.php constants:
define( 'FORWP_DRIVE_GOOGLE_CLIENT_ID', '…' );
define( 'FORWP_DRIVE_GOOGLE_CLIENT_SECRET', '…' );
define( 'FORWP_DRIVE_OAUTH_REDIRECT_URI', '…' ); // local loopback if neededwp forwp-drive synccomposer install
composer test
composer run lint- PHP source:
src/(PSR-4ForWP\Drive\) - Admin UI: plain JS in
assets/(no npm build) - Tests:
tests/unit/
WordPress.org assets: bash docs/4wp-drive/export-wporg-assets.sh (from repo public/ root; sources in plugin assets/images/).
- Google OAuth 2.0 — administrator authorization for Drive access
- Google Drive API — list, export, and move files during sync/import
See readme.txt → External services for details required by WordPress.org.
GPL v2 or later. See LICENSE if present or plugin header.