Linux 软件免费装
Banner图

Content Relay – Push Pages and Posts from Staging to Live

开发者 maheshbohara
更新时间 2026年10月29日 17:12
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

migration wpml staging deployment content sync

下载

1.0.0

详情介绍:

Content Relay pushes one piece of content from staging to live, or from live back to staging or development, without a full database migration. It relays a single page, post or custom post type entry, with every translation and its media, between the environments of the same site, in either direction. Typical uses: In each case you sync only that content, without copying a whole database or overwriting what else changed on the other site. Orders, form entries, users and settings on the live site are left alone. The theme must match. Content Relay only works between sites running the same theme at the same version. A different active theme or theme version blocks the relay; the same version with different theme files gives a warning. Deploy the theme first, then relay the content. The same plugin runs on both sites. The receiving site issues a key; the sending site stores it. From then on an administrator can hover an item in Pages (or any other content list switched on in the settings), choose Relay to…, review what the receiving site plans to do, and relay. Many posts can be relayed at once with WP-CLI. What a relay carries Content is written byte for byte. Block markup is edited only where a reference changes; it is never re-serialized. Review before anything is written The receiving site plans every relay and answers with a list of what it will create, update, reuse or refuse, with a field, meta and content diff for anything it would replace. Nothing is written until an administrator approves that plan. If the receiving site changes in the meantime, the relay is refused and the plan must be approved again. Content that was edited on the receiving site since its last relay is blocked. It can be relayed with Overwrite, which keeps a backup. After a relay What a relay does not carry Security Requirements and limits Connections to other sites Content Relay contacts only the sites you connect it to with a key: it sends the relay to the receiving site and afterwards fetches the relayed pages from it to check them. It uses no third-party service, sends nothing to the plugin author and does no tracking. WP-CLI Hooks

安装:

  1. Install and activate Content Relay on both sites.
  2. On the receiving site, open Settings → Content Relay, switch Receiving on and issue a key. Copy it: it is shown once.
  3. On the sending site, open Settings → Content Relay, switch Sending on and add a connection by pasting the key. A handshake checks it before it is stored.
  4. Deploy the same theme, at the same version, to both sites.
  5. On the sending site, hover a page in Pages and choose Relay to…. To relay posts or custom post types as well, tick them under Settings → Content Relay.
Sending and receiving can also be pinned in wp-config.php with define( 'CONTENT_RELAY_SEND', true ); and define( 'CONTENT_RELAY_RECEIVE', true ); (or false). A defined constant overrides the switch and locks it.

常见问题:

How do I push a page from staging to live?

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.

Does it copy or overwrite the whole database?

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.

Can I pull content from live back to staging?

Yes. A relay works in either direction: switch receiving on for the staging site and send from live.

Can a site both send and receive?

Yes. Switch both on and connect each site to the other with a key issued by that site.

I copied the production database to a development site. Is that a problem?

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.

What happens if a relay fails halfway?

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.

The receiving site uses Redis or Memcached.

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.

What does deleting the plugin remove?

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.

更新日志:

1.0.0 0.2.0 0.1.0