Spots

Rebuild a WordPress navigation menu with Claude without touching the live…

Reorganising a site's main menu is one of those jobs that sounds small and isn't. A client wants "Services" split into three, the blog moved under "Resources", two dead links gone and the order changed. In wp-admin that's twenty minutes of dragging items around on the menu visitors are using right now. One wrong drop and the header is broken until you notice.

It's also a job people now ask an

It's also a job people now ask an AI client to do. The risky way is to let the agent edit the live menu item by item. This post shows a safer pattern that works with any MCP client (Claude Code, Claude Desktop, Cursor, VS Code and others): build the new menu beside the old one, check it, swap the theme location, and keep the old menu as your way back.

Everything here uses WPPilot Free, a self-hosted WordPress

Everything here uses WPPilot Free, a self-hosted WordPress plugin that turns your site into an MCP server. Your AI client brings its own model; there's no relay in between.

Disclosure: I work on WPPilot. Ability names and

Disclosure: I work on WPPilot. Ability names and behaviour below are taken from the public WordPress core ability reference.

Disclosure: I work on WPPilot. Ability names and

Disclosure: I work on WPPilot. Ability names and behaviour below are taken from the public WordPress core ability reference. One scope note first: classic menus

The menu abilities in WPPilot work on classic

The menu abilities in WPPilot work on classic navigation menus: the ones you manage under Appearance → Menus and assign to theme locations like "Primary" or "Footer". If your site runs a block theme whose header uses a Navigation block, this exact workflow doesn't apply. Check before you start: if Appearance → Menus exists and your theme lists menu locations, you're good. The abilities you'll use (all Free)

Two abilities to keep away from in this

Two abilities to keep away from in this job: delete-menu (permanent, menus have no trash) and delete-menu-item (permanent). Both need explicit confirmation anyway. The whole point of this pattern is that you never need them until the new menu has been live for a while. You need self-hosted WordPress 6.9+, PHP 8.0+ and HTTPS if your client connects remotely.

Download wppilot.zip from the latest GitHub release (it

Download wppilot.zip from the latest GitHub release (it isn't on WordPress.org) and upload it under Plugins → Add New → Upload Plugin.

Leave the safety profile on Production Safe, the

Leave the safety profile on Production Safe, the install default. It blocks PHP execution, WP-CLI, filesystem and database access, and plugin/theme installs, none of which a menu job needs. Connect your client. With Claude Code over OAuth:

Use a WordPress account that can already manage

Use a WordPress account that can already manage menus in wp-admin. Every MCP call inherits that user's permissions, so the agent can't do more than that account can. Step 1: Have the agent describe what's there Start with reads only. This prompt changes nothing: You now have a written snapshot of the current menu. Save it next to your ticket. It's the plan's "before". Step 2: Build the new menu beside the old one Give the agent the target structure in plain language and make it build a new menu:

News

Rebuild a WordPress navigation menu with Claude without touching the live header until you're ready

Reorganising a site's main menu is one of those jobs that sounds small and isn't.

@spots #dev
Source: Dev.to
See more like this