Work / Modernization
Six country sites, one multisite: refactor, translation queue and crossposting
A six-country WordPress multisite: a 3,700-line theme split into modules with parity checks, content auto-translated in a GPT-4o queue, and crossposting made deliberate.
What they needed
A software company runs one WordPress multisite with six country sites. The theme had grown into one functions.php of 3,722
lines and a 1,229-line header. Content written for one country had to reach the others in their
language, and the existing crossposting plugin copied posts on every save, whether anyone meant
to or not.
What I built
- A theme refactor without surprises. The 3,722-line
functions.phpbecame a 40-line loader and fifteen modules: SEO and structured data, ACF, the content hub, REST, search, admin. The header became a short template with eight partials. The work ran in three phases and sixteen work packages, each with a ledger of what moved where and a checklist proving the site still behaved the same, plus an audit of the issues found on the way. - A translation queue. Content crossposted to another country site is queued and translated by GPT-4o in batches on cron, ACF fields and repeaters included. A dashboard widget shows the queue.
- Languages and domains: hreflang for every page with an x-default, and visitors sent to the right country site by IP or a remembered choice.
- Crossposting on purpose. A small extension turns the paid crossposting plugin from “copy on every save” into an explicit button, and starts every destination unchecked. It removes the plugin’s own hooks instead of forking it, so updates to the original keep working.
- A warning before anyone pushes from staging to live.
Why it matters
A theme that only its author could follow is now one a team can work on, and the refactor is documented step by step, so nothing changed by accident. Editors write once; the other countries get a translation, and nothing gets crossposted that nobody asked for.