Back to blog
6 min read Content Sync

Sync Polylang Menus, Categories and Media Between WordPress Sites

After the pages and posts of the roastery site were on the live site in English, German and Ukrainian, three things were still only on staging: the new category tree “Coffee guides > Brewing” with its German and Ukrainian versions, a main menu per language, and the photos with their alt text in each language. Each has its own sync, and with Polylang each needs its language and translation links to arrive with it.

PRO: term sync, menu sync and Polylang support are part of the PRO plugin; Media Library sync is free, and with PRO it keeps the language of each file. Tested with Import Export by RockStarLab 2.2.48 and PRO 2.1.44, Polylang Pro 3.9.2, WordPress 7.1.5, theme Blocksy.

Short Answer

  • Categories and tags: Posts > Categories, tick the terms in one language, Sync, Push selected terms. Their translations go along and stay linked.
  • Menus: Appearance > Menus, open the menu of a language, Sync, Push current menu. Repeat for each language; each menu lands in the theme location of its language.
  • Media: Media > Library, select files, Sync, Push selected media. Each file keeps its language, title and alt text.

Categories and Tags With Their Translations

Polylang stores “Coffee guides”, “Kaffee-Ratgeber” and “Кавові поради” as three categories linked as translations, and “Brewing” is a child of “Coffee guides” in English, of “Kaffee-Ratgeber” in German. Posts already bring the categories they use, but a category without posts, its description and its ACF fields need the term sync.

On staging, open Posts > Categories in English, tick “Coffee guides” and click Sync above the list. Choose the live site and click Push selected terms:

Sync Terms dialog: Selected terms 1, site QA aie6, buttons Push selected terms and Pull / update selected terms
Push a category; its translations go along.

The selected category is sent with its translations: our push of one English category reported 3 updated, the English, German and Ukrainian versions. When we ticked “Coffee guides” and “Brewing” together, the result was 6. On the live site each category has its language, is linked to its two translations and sits under the parent of its own language. Names, descriptions and ACF fields come from staging, and an ACF image on a category points to the media translation of the category’s language.

Two categories of different languages may use the same slug. The sync looks up each one in its own language, so the German category never takes over the English one.

A Menu per Language

With Polylang, a theme location such as “Header Menu 1” has one menu per language. On staging we had “Main menu”, “Hauptmenü” and “Головне меню”, each with the pages “Our roastery” and “Visit the roastery” in its language, the espresso guide, the category “Brewing” and a link to the shop.

Open Appearance > Menus, choose “Hauptmenü” and click the Sync button of the plugin. Choose the live site and click Push current menu. If the live site already has a menu with the same name, it is selected and updated; leave the field empty to create a new menu:

Push current menu dialog with the remote menu Hauptmenü (slug main-menu-de) selected
The live site’s Hauptmenü is selected and updated.

Each menu item points to the page, post or category of the menu’s language on the live site, even where two languages share a slug. Nested items stay nested. We pushed the English and Ukrainian menus the same way, and the live site had each menu in “Header Menu 1” of its language:

Menu locations on the live site: Header Menu 1 English with Main menu, Header Menu 1 Deutsch with Hauptmenü, Header Menu 1 Українська with Головне меню
Each menu in the location of its language.

A page that is not on the live site yet cannot be linked; such an item arrives as a custom link and the result names it. Sync the pages first, then the menu.

Browse remote menus in the same dialog pulls a menu from the live site. Before the pull, Automap picks the local page, post or category for each item; on our staging site it chose the German pages and the German category for “Hauptmenü”. Items you leave without a local object are not pulled, and the result says how many.

Media Files in Each Language

When media translations are on in Polylang, one photo can have an English, a German and a Ukrainian attachment, each with its own title and alt text, all pointing to the same file. In Media > Library, select the files, click Sync and Push selected media. The language of each file goes along, and the copies on the live site are linked as media translations.

We changed the alt text of the German cover photo on staging and pushed only that attachment. The file was already on the live site, so it was skipped, and the new alt text was applied to the German copy alone; the English and Ukrainian alt texts stayed as they were.

With an AI Agent

Import Export by RockStarLab gives AI agents its exports, imports and Content Sync as abilities. Through the WordPress MCP Adapter, WordPress itself offers an agent only read-only abilities for site, user and environment information, so without the plugin the agent cannot do the steps above. With it, one request is enough:

With Import Export by RockStarLab, push the category "Coffee guides" with its translations to the live site, then push the menus Main menu, Hauptmenü and Головне меню.

Categories go through rsl-ie-pro/sync-terms-push (with with_translations, true by default), menus through rsl-ie-pro/sync-menus-push with one menu ID per call, files through rsl-ie/sync-media-push. In our run the three menus were created on the live site with 5 items each and assigned to their locations. When an agent pulls a menu with rsl-ie-pro/sync-menus-pull, it has to pass object_mapping for the page and category items; items without a mapping are skipped and counted in items_skipped.

Before You Push

A menu push replaces the items of the menu it matches on the live site, and a term push overwrites names and descriptions. Back up the live site before the first push.

FAQ

Are category translations kept when I sync categories?

Yes, with PRO. Select the categories in one language; their translations are sent along, get their languages and stay linked on the receiving site.

Does a menu keep its Polylang location?

Yes. Each menu is assigned to the theme location of its language on the receiving site.

Do menu items point to the right language?

Yes. Items point to the page, post or category of the menu’s language, also when two languages use the same slug.

Does Media Library sync keep alt text per language?

Yes. Each media translation keeps its own title and alt text, and the copies are linked on the receiving site.

Get the free plugin on WordPress.org. Term sync, menu sync and Polylang support are part of PRO.

Dmitriy
About author

Dmitriy

WordPress Developer with 15+ years of commercial experience. Elite Author on ThemeForest and creator of custom WordPress plugins. Passionate about clean code, performance optimization, and building useful tools for the WordPress community.

JOIN THE CONVERSATION

Comments 0

Have a question or a tip to share? Leave it below.

Leave a comment

Your email address will not be published. Required fields are marked *

We store your name, email and comment to show and moderate it; your email is never published. Spam protection is provided by Cloudflare Turnstile and profile pictures by Gravatar. See our Privacy Policy.


Try the plugin with no risks!

New users get 1 month with access to all premium features. Experience the most powerful WordPress data engine today.

Download Now
Get PRO for FREE