Syndication

By Automattic

★ 4.3/5 (4 ratings)90+ active installationsVersion 2.3.0

Push posts from one WordPress site to many, and pull RSS and XML feeds in as posts.

Description

Syndication copies posts between sites. Choose the groups of sites a post should go to, and it’s pushed to every one of them, then kept up to date as you edit it. In the other direction, it pulls RSS and XML feeds into your site as posts, on a schedule.

  • Push to WordPress sites over XML-RPC, including other sites on the same multisite network, and to WordPress.com sites over the WordPress.com REST API.
  • Pull feeds: any RSS or Atom feed, or any XML feed, mapped onto posts with XPath.
  • Site groups: organize sites into groups, and push a post to whole groups at once.
  • Kept up to date: edits are pushed to the copies, scheduled posts are pushed when they publish, and copies can be deleted when the original is.
  • Loop prevention: two sites can push to each other without posts bouncing back and forth.
  • Logs and failure handling: every push and pull is logged under Sites → Logs, failed pulls are retried, and feeds that keep failing can be disabled automatically.
  • WP-CLI: push and pull from the shell with the wp syndication commands.

Stored passwords and tokens are encrypted. Define PUSH_SYNDICATE_KEY before adding sites; see the installation steps.

Documentation

Guides for site owners and developers live in the docs/ directory on GitHub:

Contributing

Bug reports and pull requests are welcome on GitHub. See the contributing guide to get started.

Support

License

GPLv2 or later. See LICENSE for details.

Installation

  1. Install and activate Syndication.
  2. In wp-config.php, define an encryption key for the passwords and tokens the plugin stores, using a long random value. Do this before adding any sites: changing it later makes every saved password and token unreadable.

    define( 'PUSH_SYNDICATE_KEY', 'a-long-random-string' );
    
  3. Go to Sites → Site Groups and create a site group.

  4. Go to Sites → Add Site, choose a transport, fill in its settings, tick the site group and set the status to Enabled. Saving tests the connection.

To push posts:

  1. On Settings → Push Syndication, under Post Types, tick the post types to push.
  2. When you edit a post, tick site groups in the Syndicate box. The post is pushed when you save it, in whatever status it has.

To pull feeds:

  1. On Settings → Push Syndication, under Site Groups, tick the site groups to pull, and set the interval under Pull Options.
  2. Choose Pull Now, or wait for the first scheduled pull.

Pushes and pulls run in WP-Cron, so make sure it’s running.

FAQ

Which sites can I push to?

WordPress sites with XML-RPC switched on, using a username and an application password, and WordPress.com sites, using an OAuth token. Featured images and galleries need Syndication active on the receiving WordPress site. See setting up sites.

Can I push to sites that aren’t WordPress?

Not with the built-in transports. Developers can add their own; see how Syndication works. Pulling works with any RSS, Atom or XML feed.

What’s sent with a pushed post?

Over XML-RPC: the title, content, excerpt, status, password, date, post type, categories, tags, custom fields, featured image and gallery images. Over WordPress.com REST: the title, content, excerpt, status, password, date, categories and tags. Authors, slugs and other taxonomies aren’t sent. See what gets sent.

Why are my drafts appearing on other sites?

A post is pushed whenever it’s saved with site groups ticked, in whatever status it has, so a draft becomes a draft on the other sites. Tick site groups when the post is ready, or only push published posts.

Why isn’t my feed being pulled?

Scheduled pulls only cover the site groups ticked under Site Groups on Settings → Push Syndication, and only enabled sites. Check Sites → Logs for errors, or run wp syndication pull-site --site_id=<id> to pull it now.

What happens when I delete a post?

If Delete pushed posts is ticked on Settings → Push Syndication, its copies on other sites are deleted too, when it’s trashed or deleted. Otherwise they’re left alone.

Does it work with multisite?

Yes. Each site on the network has its own sites, site groups and settings. To syndicate between sites on the network, add them as WordPress XML-RPC sites.

Screenshots

Changelog

The highlights of recent releases are below. Every change, including older releases, is listed in CHANGELOG.md.

2.3.0

  • Changed: Existing XML sites keep publishing pulled posts, and “Delete pushed posts” is ticked on existing installs, so nothing changes on update. Both settings now work, so review them afterwards.
  • Changed: Scheduled posts, and posts published by WP-CLI or code, are now pushed.
  • Changed: A pull only updates posts pulled from the same site.
  • Changed: The admin says “site group” instead of “sitegroup”, and the Edit Site screen works with a keyboard and screen reader.
  • Fixed: Pushes and pulls now reach every site in a site group, not just the first 100.
  • Fixed: Password-protected posts stay protected on XML-RPC sites, and edits reach XML-RPC sites after the first push.
  • Fixed: REST and RSS dates are correct on sites outside UTC, and RSS pulls fetch a fresh feed each time.
  • Fixed: Sites are disabled only after consecutive pull failures, and pull jobs no longer pile up.
  • Fixed: Many smaller problems with XML pulls, the Logs screen, WP-CLI output and WordPress.com authorization.

2.2.2

  • Fixed: PHP warnings logged when a post is pushed or deleted.
  • Fixed: Push deletions are now recorded in the site’s syndication log.

2.2.1

  • Security: Hardened the XML-RPC thumbnail methods, the log viewer, site and plugin settings, stored credentials, WordPress.com API requests and XML feed parsing.
  • Changed: XML-RPC thumbnails are fetched with wp_safe_remote_get(), so thumbnails from a source on a private address need that host allowed through the http_request_host_is_external filter.
  • Fixed: Filtering and pagination on the Syndication Logs screen.