Linux 软件免费装
Banner图

4WP Drive

开发者 4wpdev
anatolikkk
更新时间 2026年9月4日 04:17
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

import drafts editorial google drive content pipeline

下载

1.0.2 1.0.1 1.1.0 1.3.0 1.4.0

详情介绍:

4WP Drive connects a Google Drive folder workflow to WordPress: writers drop documents in Drive, editors review them in an admin Inbox, and approved content becomes draft posts or updates existing posts and pages—without copy-paste. A plugin by 4wp.dev. Learn more, workflow details, and comparisons on the plugin page at 4wp.dev/plugin/4wp-drive/. Perfect for How it works
  1. Install and activate 4WP Drive.
  2. Create Google OAuth credentials and connect Drive in Storage sources.
  3. Set your Drive root folder ID; the plugin uses incoming/ and published/ subfolders.
  4. Drop a Google Doc (with optional image) into incoming/ or run Sync.
  5. Open Inbox — pick a storage source tab (Google Drive today; GitHub and others on the roadmap), sync, select a document in the queue, then preview and Create new draft, Update existing post, or Reject in the workspace.
  6. On import, files move to published/ in Drive.
Key features Privacy OAuth tokens and Google API credentials are stored in your WordPress database (encrypted). Document content is fetched from Google Drive only when an administrator runs sync or import. No visitor-facing tracking. 4WP is our project brand; the letters "WP" appear only as part of that brand name, not as a reference to WordPress. This plugin is not affiliated with, endorsed, or sponsored by WordPress. Source code: github.com/4wpdev/4wp-drive Plugin overview and FAQ: 4wp.dev/plugin/4wp-drive/ Development Human-readable PHP source is in the public GitHub repository above. The plugin ZIP includes src/ (PSR-4 autoload via src/Autoload.php when vendor/ is absent). No npm build step — admin scripts ship as plain JS in assets/. Run tests: composer install && composer test && composer run lint

安装:

  1. Upload the plugin to /wp-content/plugins/4wp-drive/ or install from the Plugins screen.
  2. Activate 4WP Drive.
  3. Open 4WP Drive → Storage sources (or Documentation for the setup guide).
  4. Paste Client ID and Client Secret from Google Cloud Console → Save credentials.
  5. Click Connect Google Drive, then enter your Drive root folder ID and save subfolders.
  6. Use Inbox to preview and import documents.
Optional: define FORWP_DRIVE_GOOGLE_CLIENT_ID, FORWP_DRIVE_GOOGLE_CLIENT_SECRET, or FORWP_DRIVE_OAUTH_REDIRECT_URI in wp-config.php.

屏幕截图:

  • Google Drive — OAuth credentials, Connect, and folder mapping.
  • Document template — map front-matter labels to post fields and taxonomies.
  • Drive folders — WordPress settings alongside the matching `incoming` / `published` / `failed` folders in Drive.
  • Inbox — synced articles from `incoming/` with Preview, Import as Draft, and Reject.
  • Document template — example header format next to a Google Doc with front-matter.
  • Inbox preview — parsed metadata and featured image before import.
  • Imported draft — post editor with content, featured image, categories, and Yoast SEO fields.
  • Published post — front-end article after import from Drive.

升级注意事项:

1.4.0 Editorial Inbox: source tabs, status bar, queue + workspace preview. Tested up to WordPress 7.1. 1.3.0 Map Google Doc FAQ sections to Gutenberg blocks from Settings → Body → block templates (4WP FAQ or Core Accordion). 1.2.0 Polylang sites: pick content language in the Inbox before import; update mode respects the selected language. WPML is planned. See Settings → Multilingual integration. 1.1.0 Update existing posts and pages from the Inbox—pick a target post before import. 1.0.2 Inbox sync UX and Google Drive connection health notices. Reconnect in Settings if sync stops working. 1.0.1 Maintenance release addressing WordPress.org plugin review feedback on core file includes. 1.0.0 First public release. Connect Google Drive, sync incoming docs, and import drafts from the admin Inbox.

常见问题:

Do I need a Google Cloud project?

Yes. Create OAuth 2.0 credentials (Web application), enable the Google Drive API, and register the redirect URI shown in the plugin Documentation tab.

What document format is supported?

Google Docs in incoming/ (single doc or subfolder with doc + image). Front-matter uses Label: value lines before a separator paragraph (--- or a row of = characters). The rest is post body.

Are API keys exposed to visitors?

No. OAuth and Drive requests run on the server. Only administrators with manage_options can connect Drive and import.

Can I lock credentials in wp-config.php?

Yes. Use FORWP_DRIVE_GOOGLE_CLIENT_ID and FORWP_DRIVE_GOOGLE_CLIENT_SECRET constants.

Does it work on local dev (.local / 127.0.0.1)?

Yes. Use the OAuth redirect (local) field when Google rejects your site hostname; register the same loopback URI in Google Cloud Console.

Can I update an existing post or page instead of creating a draft?

Yes. In Inbox → Preview, choose Update existing post, search or pick a target, and confirm. The document content is imported into that post. Use Import as Draft when you want a new post instead.

What changes when I update an existing post?

The plugin updates title, content, mapped categories/tags, SEO meta (when configured), and featured image (when the Drive folder includes an image). Optional front-matter date updates post_date when present. The post slug and status (published, draft, etc.) stay as they were unless your site or other plugins change them.

Which posts can I select to update?

Only posts of the configured import post type (for example Posts or Pages under Document template). Targets must be posts you can edit (edit_post). Published, draft, pending, private, and scheduled posts are supported. The picker can suggest a match by document slug or title before you search.

Is update mode safe? Will it overwrite without asking?

You must select a target and confirm before import. If the slug or title in the document matches an existing post, the plugin may suggest that post first—you still choose explicitly. Always preview the document before updating production content.

Does update mode work with pages and custom post types?

It works with whichever post type you set as the import type in Document template. Switch the import type to Page (or another public type with editor support) to update pages instead of posts. The target must match that same type.

Does 4WP Drive work with multilingual sites?

Polylang (1.2.0): When more than one language is configured, open Inbox → Preview & import and select Content language before import (no default). New drafts receive that language; Update existing post lists and validates targets in the selected language only. Language is not read from Drive folder names. WPML: Shown as Planned under Settings → Multilingual integration; not used for import in this release. Single-language sites (no Polylang) behave as before — no language picker in the Inbox.

Where do I see which multilingual plugin is active?

4WP Drive → Settings → Storage sources — scroll to Multilingual integration. Cards show Polylang (live), WPML (planned), and single-language fallback, with status badges (Active, Inactive, Not installed, Planned).

更新日志:

1.4.0 1.3.0 1.2.0 1.1.0 1.0.2 1.0.1 1.0.0 0.1.0