How to Build and Run a WordPress Site from Claude Code

performance

Using claude code wordpress as your development environment means you can edit theme files, run WP-CLI commands, and operate a live site through remote tools, all from one terminal session. This guide covers both modes: the code-editing workflow and the live-site operations workflow through the Model Context Protocol. Read through the Key Takeaways first to see which sections apply to your situation.

How to Build and Run a WordPress Site from Claude Code

Key Takeaways

Key Takeaways
Photo by Negative Space on Pexels

Setting Up Claude Code for WordPress

Claude Code is Anthropic's command-line coding agent. It runs in a terminal, reads and edits files, executes commands, and calls remote tools over the Model Context Protocol. Those four things cover most of what you need to build and run a WordPress site without opening a browser.

Two Modes for Working on WordPress

The first mode is code. You check out your theme and plugin files locally, run WP-CLI commands, commit through git, and push through a deploy step. Claude Code reads functions.php, understands plugin structure, and can scaffold, edit, or debug PHP files from your instructions. If you already have a local development workflow, this mode fits into it without changes.

The second mode is live-site operations through an MCP server. Instead of editing files, Claude calls tools that act on a running WordPress installation: creating and editing pages and posts, publishing content, reading site data, triggering backups, purging cache, and taking screenshots. This mode does not need a local checkout.

Adding the MCP Server to Claude Code

Connecting Claude Code to Nova's MCP server takes one command:

claude mcp add --transport http nova https://mcp.nova.host/mcp \
  --header "Authorization: Bearer $NOVA_MCP_API_KEY"

This registers the server under the name nova and tells Claude Code to send your API key with every request. To share the configuration across everyone working in a repo, add a .mcp.json file to the project root:

{
  "mcpServers": {
    "nova": {
      "type": "http",
      "url": "https://mcp.nova.host/mcp",
      "headers": {
        "Authorization": "Bearer $NOVA_MCP_API_KEY"
      }
    }
  }
}

The type is http, the URL is the server endpoint, and the Authorization header carries your Bearer token. Claude Code reads this file when you open the project. After that, Claude selects the right tool based on what the task requires. You do not need to name tools yourself.

Connecting Claude to a Live WordPress Site with MCP

The claude wordpress mcp integration shifts the workflow from editing files to acting on a live site. Nova's MCP server sits between Claude Code and your WordPress installation. It does not require a plugin on the site.

What the WordPress MCP Server Is (and Is Not)

WordPress core provides the Abilities API. The MCP Adapter is a separate project from the WordPress organization. Nova's MCP server is independent of both. It connects to Nova-hosted sites through Nova's own platform. You do not install or configure anything on the WordPress side.

The endpoint is https://mcp.nova.host/mcp. The transport is Streamable HTTP. Authentication uses a Bearer API key. The server is in early access.

What the 23 Tools Cover

The server exposes 23 site-bound tools:

  • Content: create and edit pages and posts
  • Publishing: set post status and trigger publication
  • Site data: read configuration and metadata
  • Backups: check backup status and request restores
  • Cache: purge cached content
  • Screenshots: capture the current state of a page
  • Change requests and confirmed restores: propose and confirm destructive actions

Form submission values are hidden by default. This limits what the agent can read from contact forms or user-submitted data.

How Grants and Safety Controls Work

Every key starts with all grants switched off. The account owner turns grants on per site, so the agent can only call tools you have explicitly allowed. Destructive actions need an acknowledgement in the dashboard before they become available. A restore requires a five-minute single-use confirmation code. Every tool call goes into an audit log. Calls are rate-limited per user and per site, with 24-hour caps.

Keys can be rotated from the dashboard. The dashboard also shows a ready-to-paste .mcp.json block.

Start with non-destructive grants and test before turning on anything that deletes or restores. The audit log shows you exactly what the agent did, which matters when more than one person or machine has access to a site.

Letting the Agent Provision Your Hosting

Nova's Self-Managed plan is the tier built for this workflow. It costs $49 per month with no setup fee. You get one WordPress site on your own domain, 10 GB of storage, 100 GB of bandwidth per month, one custom domain, automatic SSL, daily backups, and free migration. The plan includes 30 site audits and 20 AI drafts per month. Agent access is included during early access.

Self-managed means Nova does not run the site for you. You run it, or your agent runs it over MCP. Nova's managed plans (Scale, Momentum, Infinite, and Synergy) are operated by Nova, and on those plans Agent access is enabled per account during early access. Plan details are on the pricing page. The agent workflow is on the agent-managed hosting page. The MCP server is documented on the MCP page.

The Seven-Step Agent Onboarding Flow

An agent can set up hosting through Nova's agent onboarding API. The API is an OpenAPI 3.1 file at https://nova.host/openapi.json, with a plain-text index at https://nova.host/llms.txt.

Step 1. POST /api/agent-onboarding/register with an email address, a password, an optional company name, and an idempotency key. The response returns an onboarding ID and a poll token.

Step 2. Poll GET /api/agent-onboarding/{id} until the account owner clicks the verification email. The state moves from awaiting_email to claimed. A human must do this step.

Step 3. POST /api/auth/login to get an auth token. No token exists before verification, so this step cannot happen earlier.

Step 4. POST /api/agent-onboarding/checkout with the plan identifier. The response is a Stripe checkout link. The agent sends this link to the account owner.

Step 5. Poll until the state is paid. This only changes after Stripe's signed webhook confirms an active subscription. Payment is the second human step.

Step 6. POST /api/tenants with the subscription ID, the site name, and a subdomain to provision the site.

Step 7. POST /api/agent-onboarding/{id}/finalize with the tenant ID. The response includes the MCP endpoint, the API key (shown once), a .mcp.json block, the claude mcp add command, the site URL, and the wp-admin URL.

Keys from this flow start with non-destructive grants on and destructive grants off. The account owner does not need to open the dashboard. Only two steps need a human: the verification email and the Stripe payment.

What a Practical Session Looks Like

You describe the site to Claude Code. It registers the account and asks you to verify your email. You pay through the Stripe checkout link. It provisions the site, connects over MCP, creates pages and posts, sets navigation, and publishes. Later sessions can cover drafting content, checking backups, purging cache, and taking screenshots.

If you're moving an existing site, the migration guide covers the process. To limit what the REST API exposes about your users, see the guide on hiding users from the WP-JSON REST API.

The Bottom Line

Claude Code gives you two ways to work on a WordPress site from the terminal. The first is file editing in a local checkout with WP-CLI and git. The second is live-site operations through Nova's MCP server, which covers content, publishing, backups, cache, and screenshots through 23 tools and a grant-based permission model. Nova's agent onboarding API means an agent can handle the full setup from registration to a working site, with only email verification and payment left to a human.

If you want to talk through which setup fits your situation,.

FAQs

Can Claude Code build a WordPress site from scratch?

Claude Code can scaffold theme and plugin files, run WP-CLI commands, and manage a WordPress codebase like any other project. When connected over MCP, it can also provision the site, create pages and posts, set navigation, and publish, without you opening a browser.

Do I need to install a plugin to connect Claude to WordPress?

No plugin is required on Nova-hosted sites. Nova's MCP server connects through Nova's own platform. The WordPress MCP Adapter is a separate project from the WordPress organization and is not part of this setup.

How does Claude Code connect to a WordPress host?

Claude Code connects through a remote MCP server using Streamable HTTP. You register the server with one claude mcp add command or add a .mcp.json file to your project root. Authentication uses a Bearer API key.

What can Claude Code change on a WordPress site through MCP?

Through Nova's MCP server, Claude Code can create and edit pages and posts, publish content, read site data, check and request backups, purge cache, and take screenshots. Destructive actions need explicit grants and a confirmation step before they run.

Can an agent set up the hosting without me opening a dashboard?

Yes. An agent handles registration, polling, checkout link generation, site provisioning, and finalization through Nova's onboarding API. Two steps need a human: clicking the verification email and paying through the Stripe link. The dashboard is not required for the rest.

See What's Included With Nova Managed Hosting

Nova runs every managed WordPress tenant in an isolated Kubernetes namespace with daily automated backups and managed core/plugin updates. If you're troubleshooting a specific issue on your own site, our team can help.