Amirhossein HosseinpourAmirhpCom
Resume Book a consultationBook
Delivered WordPress plugin · Custom build

Sync Posts across two sites

Write once, publish on a second site, translated on the way.

Syncs posts from one WordPress site to another, and translates them through the Yandex API on the way.

All portfolio
Remote Post Configurations
A popup log while a post is saved to the remote site: each step, from checking the thumbnail to parsing taxonomies and editing the post over XML-RPC, then finished in 10 seconds with links to edit or view it on the remote site.

What you are looking at

  • Every save to the second site shows its steps as they run.
  • It ends with links to edit or view the post on the remote site.

Screenshot from the original project, May 2022 or earlier.

Open the full-size screenshot

// what-it-does

What it does

Two sites, one editor, and no copying and pasting between them.

From the post editor on the first site, a Remote Post Configurations box sends the post to the second site, in a popup that logs each step. Title, slug and tags for the remote copy can be set before sending.

In the editor

  • Save to the remote site, in a popup, with or without forcing the thumbnail
  • Automatic translation through Yandex
  • Translate with Yandex or with Google on demand
  • View or edit the post on the remote site
  • A remote title, slug and tags for the copy
  • A step-by-step log of every save

// how-it-was-built

How it was built

WordPress to WordPress over XML-RPC, driven by AJAX from the editor.

The log shows the path: the save starts over AJAX, checks the thumbnail on both sides, parses the taxonomies, then edits the remote post over XML-RPC and reads back its slug.

WordPressPHPXML-RPCAJAXYandex Translate APIGoogle Translate
Status

A custom build from before 2022. The code was never published and I no longer maintain it; this page keeps the record of what it did.

branch main 6 active projects ↑ 113 releases portfolio/sync-posts-across-two-site.md Sari --:-- UTC+3:30 its@amirhp.com