Back to blog
5 min read Content Sync

Menu Items Point to the Wrong Pages After Copying a Menu to Another Site

A WordPress menu item doesn’t store the address of the page it links to; it stores the page’s ID. The same page has a different ID on every site, so a menu copied to another site as-is points to the wrong pages, to posts that happen to have those IDs, or to nothing. With Import Export by RockStarLab PRO, a menu push finds each page, post and category on the other site and links the item to it there, and tells you which items it couldn’t find.

PRO: menu sync between sites is a PRO feature and needs PRO with a license on both sites. The test below used Import Export by RockStarLab 2.2.13 and PRO 2.1.31.

Short Answer

Push the menu from Appearance > Menus with Sync > Push current menu into a menu on the other site. Page, post and category items are linked to the page, post or category with the same slug (or the same title) on the other site, whatever its ID. Custom links keep their address. An item whose page doesn’t exist on the other site is added as a custom link to the source site and named in the result; copy that page first and push the menu again.

The menu we pushed

On the source site, the Shop Footer menu had six items: two pages, a post, a category, a custom link to Instagram and the Gift Cards page:

Shop Footer menu on the source site with two pages, a post, a category, an Instagram custom link and the Gift Cards page
The menu on the source site, with its Export and Sync buttons.

The other site had the pages Wholesale Enquiries and Barista Courses, the post and the category, all with other IDs than on the source site. Gift Cards existed only on the source site.

Push the menu

Menu sync updates a menu that exists on the other site, so we first created an empty Shop Footer menu there. Then, on the source site, in Appearance > Menus with Shop Footer open, we clicked Sync, chose the other site, clicked Push current menu and picked the receiving menu:

Push current menu dialog with the receiving menu Shop Footer selected
Pick the menu on the other site that receives the items.

The result named the item it couldn’t link:

Sync Menus result: Menus synced, Items: 6, Gift Cards not found on the receiving site and added as a custom link to the source site
The result names the item whose page the other site doesn’t have.

Five items were linked to the right objects on the other site. Gift Cards was added as a custom link to the page on the source site, so the menu has no gap, but on a live site that link would lead visitors to staging. That’s why the result names it.

Fix the missing page and push again

We pushed the Gift Cards page to the other site with Content Sync and pushed the menu again. This time all six items were linked, and the menu on the other site showed Gift Cards as a Page item:

Shop Footer menu on the receiving site with all six items, Gift Cards now a Page item
After the page was copied and the menu pushed again, every item is linked.
Menu item on the source site On the other site after the push
Page that exists there with another ID Linked to that page
Post that exists there Linked to that post
Category that exists there Linked to that category
Custom link Same address
Page that doesn’t exist there Custom link to the source page; named in the result

Things to know

  • Pages and posts are matched by their slug (for child pages, the full path such as shop/gift-cards), then by exact title. If neither matches on the other site, the item becomes a custom link as above.
  • Push the pages and posts with Content Sync first, then the menu: its items link to them right away.
  • Each push makes the receiving menu match the source menu item for item, so edit the menu on the site you push from.
  • Assign the menu to its location (header, footer) once on the other site in Appearance > Menus > Manage Locations; later pushes keep it there.

As before any push, back up the site you push to, or ask your AI agent to start the backup.

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 (to connect an agent, see connecting Claude Code to WordPress). With it, one request is enough:

With Import Export by RockStarLab, push the Shop Footer menu to the Shop Footer menu on the staging site.

In our run, the agent listed the menus on staging with rsl-ie-pro/sync-menus-browse to find the receiving menu’s ID, then called rsl-ie-pro/sync-menus-push with the source menu and that ID. The result was 1 menu updated and 6 items created, 0 failed.

FAQ

Menu items store page IDs, and IDs differ between sites. A menu push links each item to the page with the same slug or title on the other site.

What happens to a menu item whose page doesn’t exist on the other site?

It is added as a custom link to the source site’s page, and the result names it. Copy the page and push the menu again.

Do I need to create the menu on the other site first?

Yes. Create an empty menu with the same name there, then pick it as the receiving menu.

No. Custom links keep the address you entered.

Get the free plugin on WordPress.org.

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