Claude Code for WordPress: how to set it up and use it
Updated October 17, 2026 · by the Novamira team
Claude Code is Anthropic’s coding agent for the terminal, and WordPress is where it gets interesting: a stack where content, database, theme code and page builders all live together. This guide shows how to connect Claude Code to a WordPress site, which route fits which setup, and how experienced developers organize the work across local, staging and production.
Can Claude Code work on a WordPress site?
Yes. Connected through an MCP server for WordPress or through the Novamira CLI, Claude Code can read and write posts and pages, build Elementor and Bricks layouts, manage plugins, query the database and run PHP on the site, one visible tool call at a time. The connection is direct between your terminal and your site, with no third-party server in between.
Claude Code vs Claude Desktop for WordPress: what changes?
Both connect to the same Novamira under the hood, so the abilities are identical. What changes is the way of working. Claude Desktop is a chat: you describe, it acts, you watch. Claude Code lives in the terminal, next to your files and your git history, so it can combine site operations with everything a developer does around them: version control, local builds, running tests, editing theme code in your repository and pushing it through your own deploy process. If your WordPress work is mostly content, chat is enough. If it involves code, Claude Code is the better fit, and the rest of this guide is about that workflow.
Ways to connect Claude Code to WordPress
Four routes, not equivalent:
| Route | Setup | What you get | Best for |
|---|---|---|---|
| Novamira CLI | One install, one login per site | All Novamira abilities, multi-site profiles, guided setup | Developers, especially on several sites |
| MCP with OAuth | One claude mcp add command |
All Novamira abilities over MCP | A single site, standard MCP setup |
| Custom MCP server on the REST API | You build and host it | Only what the REST API exposes | Teams with specific needs and time to maintain code |
| SSH and WP-CLI | Shell access to the server | Shell commands, no structured WordPress tools | Server administration |
The Novamira CLI is the route built for this exact case: a coding agent in a terminal. It is leaner than MCP, keeps a profile per site so “the staging site” and “the client’s shop” are one flag apart, and when a grant expires it runs a self-check and reconnects instead of failing the session. The MCP route works just as well for a single site and needs no extra tool. A custom server on the REST API means maintaining your own code for a subset of what the first two routes already do. Plain SSH gives Claude Code a shell, but it then improvises with WP-CLI and SQL instead of calling structured, documented tools, which costs tokens and retries.
How to set up Claude Code with the Novamira CLI
Requirements: the Novamira plugin active on the site (WordPress 6.9 or later, Novamira 1.11.0 or later), free from the download page. Then install the CLI:
# macOS / Linux
curl -fsSL raw.githubusercontent.com/use-novamira/novamira-cli/main/install.sh | sh
# Windows (PowerShell)
irm raw.githubusercontent.com/use-novamira/novamira-cli/main/install.ps1 | iex
The installer asks which agent you use, detects Claude Code and wires it up. Connecting a site is one guided step: give it the site URL, approve the sign-in from your browser, and the CLI stores a profile for that site. From then on Claude Code discovers the site’s abilities on its own; you just talk:
claude
> Use Novamira to list the five most recent posts on staging
> Build a pricing page on the staging site and check it renders
Working over SSH or inside a container, where no browser can open, the CLI signs in with a device code instead: it shows a short code and you approve it from any device where you are signed in to the site. Only approve a code you started yourself. The CLI is free and open source, like the plugin.
How to connect Claude Code via MCP
If you prefer a standard MCP connection, one command does it, then sign in when the browser opens:
claude mcp add novamira-your-site --transport http https://your-site.com/wp-json/mcp/novamira-oauth
For a site running locally, use the mcp-remote bridge shown on the Novamira > Configuration page in the WordPress admin, which runs the browser sign-in on the client’s behalf. The guide to connecting Claude covers every variant of this route, including Claude Desktop and Claude.ai.
Watch it in action
This independent walkthrough by Jeffrey at Lytbox shows Claude Code working on a WordPress site from the first command:
A workflow that holds up: local, staging, deploy
Claude Code makes changes quickly, which is exactly why the environment it works in is worth choosing deliberately. The pattern experienced teams use:
- Build locally or on staging. Novamira is recommended for staging environments with backups. Let Claude Code experiment where a wrong turn costs nothing: a local site connected through the mcp-remote bridge, or a staging copy connected through the CLI.
- Review on the rendered site. Ask Claude Code to check its own work on the front end, not just in the editor, before you look at it yourself.
- Deploy through your own process. Theme and plugin code belongs in git and goes to production the way your code always does. Content changes made on staging move with your usual sync tooling.
- Inspecting a live site? For questions on a production site (what changed, why a page is slow, what a plugin stores), Read Mode in Novamira Pro offers read abilities only.
Teach it your conventions
Claude Code reads a CLAUDE.md file in your project for standing instructions, and that is a good place for WordPress conventions: which builder the site uses, where custom code lives, what not to touch. On the site side, Novamira skills store reusable workflows next to the data they operate on, so every connected agent follows the same playbook. Novamira Pro adds memory between sessions, so what Claude Code learns about a site on Monday is still there on Friday; the details are on the Pro page.
Common errors and how to fix them
The install or connection step fails on an older stack. The CLI requires WordPress 6.9 or later and Novamira 1.11.0 or later on the site. Update the plugin first.
The browser sign-in never opens. In a shell without a browser (SSH, containers, CI), the CLI falls back to the device code flow automatically. If it does not, update the CLI with novamira update.
The connection times out on some hosts. Some hosts filter traffic from cloud AI providers. The connecting guide in the docs covers what to do when your host or a firewall blocks the connection.
A tool call is refused. Check which features are enabled under Novamira > Features in the WordPress admin, and whether Read Mode is active on that site.
Claude Code seems to ignore the site. Make sure the session can see the connection: with the CLI, run novamira sites to confirm the profile exists; with MCP, run claude mcp list and check the server is listed and connected.
Where to go from here
Connect a staging copy and give Claude Code a real task: an audit of the installed plugins, a landing page in your builder, a content model for a new section. The tools page lists everything it can call, and how it works explains what happens between your terminal and your site.