| 开发者 | maheshbohara |
|---|---|
| 更新时间 | 2026年10月29日 17:12 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
content_relay_purge_page_cache.<html lang>, the hreflang alternates, that no link still points at the sending site, and that its images load.content_relay_query_dependencies filter; the receiving site then warns when they find nothing.CONTENT_RELAY_ENCRYPTION_KEY, or with the AUTH_KEY and SECURE_AUTH_KEY salts.manage_options) can relay, issue keys or add connections. A key stops working when it is revoked or when the administrator who issued it loses that role.CONTENT_RELAY_IP_ALLOWLIST in wp-config.php limits which sending IPs are accepted.wp content-relay keys generate --label=<label> · keys list · keys revoke <kid> — on the receiving site.wp content-relay connections add <key> --label=<label> · connections list · connections test <label> · connections remove <label> — on the sending site.wp content-relay plan <page-id> --to=<label> — ask the receiving site for its plan without relaying.wp content-relay push <page-id> --to=<label> [--overwrite] [--flush-cache] [--yes] — relay, then check the pages.wp content-relay push-many [<id>...] --to=<label> [--post_type=<type>] [--tag=<slug>] [--category=<slug>] [--all] [--dry-run] — relay many posts, one translation group at a time.wp content-relay verify <session> — check a relay's pages again.wp content-relay rollback <session> --to=<label> — roll back a relay sent to another site; without --to, a relay received here.wp content-relay history [--direction=out|in] [--offline]wp content-relay discover <page-id> · bundle <page-id> · plan <dir> · apply <dir> — an offline bundle, written to uploads/content-relay/bundles/, for sites that cannot reach each other.content_relay_post_types — post types that can be relayed (default: pages).content_relay_meta_denylist — meta keys never relayed.content_relay_resolvers — reference resolvers used to discover what a page needs.content_relay_query_dependencies — content a page lists by query, checked after a relay.content_relay_page_cache_integrations, content_relay_purge_page_cache — page-cache purging.content_relay_before_commit, content_relay_applied — around the content commit on the receiving site.content_relay_request_denied — a refused relay request.content_relay_http_args, content_relay_max_chunk_bytes — transport tuning.define( 'CONTENT_RELAY_SEND', true ); and define( 'CONTENT_RELAY_RECEIVE', true ); (or false). A defined constant overrides the switch and locks it.Install the plugin on both sites, issue a key on the live site and paste it into the staging site. Then hover the page in Pages on staging, choose Relay to…, review the plan the live site answers with, and relay.
No. Only the page or post you relay, its translations, its media and the terms it needs are written. Everything else on the receiving site stays as it is.
Yes. A relay works in either direction: switch receiving on for the staging site and send from live.
Yes. Switch both on and connect each site to the other with a key issued by that site.
A database copy carries the switches and the keys production issued, so the copy arrives with receiving switched on and those keys active. Switch receiving off on the copy, or pin CONTENT_RELAY_RECEIVE to false in its wp-config.php. Stored connection keys cannot be decrypted on a site with different salts.
The content is committed in one database transaction. If anything fails, the transaction is rolled back and the media created for that relay are removed.
Content Relay clears the cache entries of the posts it writes. Tick Flush the entire object cache on the relay screen, or pass --flush-cache to wp content-relay push, if other cached data depends on them.
Deactivating keeps everything. Deleting the plugin removes its settings, keys and connections, the relay log, the relay identity stored on posts and terms, and wp-content/uploads/content-relay/, which holds the rollback backups. Relayed pages, media and terms stay.
content_relay / content-relay; data stored under the old names is not migrated.wp content-relay push-many: relay many posts at once (by ids, --tag, --category or --all, matched in every language), one translation group per session, with --dry-run, --existing=update|skip, --media-fallback and --skip-missing-media.