The short version: the official WordPress Studio 2.0 plugin, wp-studio, turns "create a local site, run WP-CLI, validate blocks, take screenshots" into MCP tools. Once installed, Claude Code and Codex can each spin up a WordPress site from a single prompt. We tested it with our site's Key: the 4 plugin install commands took about 4 seconds in total. Claude Code built the site, made the Cover homepage, and published a post in 119 seconds. Codex got stuck on the plugin's built-in MCP, so we connected it manually with the npm version of the Studio CLI and finished the same task in 155 seconds.
Create an API Key that works with both Claude Code and Codex →
What's new in WordPress Studio 2.0
On October 19, Automattic released WordPress Studio 2.0.0, and followed up with plugin 2.0.1 the same day. A few points that matter for this article:
- There's a new Codex plugin, and it bundles the Studio CLI, so it works without the desktop app.
- Starting with 2.0.1, Claude Code can install it from the same plugin marketplace, Automattic/studio-plugins.
- There's a new
studio mcpcommand, so any AI tool that supports MCP can connect. - The desktop app ships installers for Mac, Windows, and Linux (DEB). See the Studio website for details.
The plugin's tools includestudio_instructions(reads Studio's site-building workflow),site_create(creates a site),wp_cli(runs WP-CLI),validate_blocks(validate block code),scaffold_theme(generate a theme),take_screenshot(take screenshots), and more. The AI readsstudio_instructionsfirst, then follows the workflow described there.
Who it's for
- People who want to build a company site, blog, or landing page without clicking around the WordPress admin.
- Developers taking on WordPress freelance work: have the AI build a first draft locally, then show it to the client.
- People who already use Claude Code or Codex to write code and want to hand site building over to it too.
Step 1: Install Studio
There are two ways to install it. Pick either one.
Desktop app: go to the Studio website Download the installer for your operating system.
Command-line version: the one on npm, wp-studio package is the official Studio CLI and requires Node 22 or later:
npm i -g wp-studio
Once it's installed, check the version and try creating a site:
studio --version
studio create --path ~/Studio/my-site --name "My Site"
We tested this on Linux: the npm install took 16 seconds; the first time studio create downloads PHP 8.4 (about 28MB), and the download plus startup took 10 seconds in total. After that, it prints the site address (such as http://localhost:8881), along with the admin username and password. Studio ships with PHP and SQLite, so you don't need to install MySQL or Docker separately.
Step 2: Connect Claude Code and Codex to your site
For Claude Code installation, see the Claude Code setup guide. Once it's installed, write the global config ~/.claude/settings.json:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.aicodewith.ai",
"ANTHROPIC_AUTH_TOKEN": "sk-你的Key"
}
}
For Codex installation, see Codex setup guide, with the global config in ~/.codex/config.toml:
model_provider = "aicodewith"
model = "gpt-5.6-sol"
[model_providers.aicodewith]
name = "aicodewith"
base_url = "https://api.aicodewith.ai/chatgpt/v1"
wire_api = "responses"
experimental_bearer_token = "sk-你的Key"
Use the same key on both sides. In our test, Claude Code ran claude-opus-5-5, and the Codex log showed model: gpt-5.6-sol. The plugin only handles WordPress operations. Model calls go through the endpoint configured above, and tool calls work normally with a third-party API.Step 3: Install the wp-studio plugin on both sides
For Claude Code, add the plugin marketplace first, then install the plugin:
claude plugin marketplace add Automattic/studio-plugins
claude plugin install wp-studio@studio
After installing, start a new session, or run /reload-plugins inside the current one. Use the command below to confirm the MCP server is connected:
claude mcp list
When you see plugin:wp-studio:wordpress-studio ... ✔ Connected in the output, it's ready to use.
The Codex commands are almost the same:
codex plugin marketplace add Automattic/studio-plugins
codex plugin add wp-studio@studio
The 4 commands took about 4 seconds in total in our test, and the installed plugin version was 2.0.1. The plugin is enabled globally in both Claude Code and Codex (Claude Code shows scope: user), so you can use it from any project directory.
The first time the plugin starts, it unpacks its bundled Studio CLI (cli.tar.br). The plugin's startup script looks for the Studio desktop app or a system Node first, and only falls back to the installedstudiocommand if it finds neither.
Step 4: Build a site, edit the homepage, and publish a post with one prompt
Claude Code: 119 seconds
The prompt we gave Claude Code was:
用 WordPress Studio 工具新建一个本地站点,名字叫 Coffee Lab,一个精品咖啡店官网。然后:1) 把首页改成有一个 Cover 区块的 hero(标题"手冲咖啡实验室",一个按钮"查看菜单");2) 发布一篇文章《三款入门手冲器具对比》,正文 300 字左右。最后告诉我站点本地地址、文章链接,以及用了哪些 Studio 工具。
Result: it finished in 119 seconds and 21 turns, with no errors along the way. Here's the order of operations:
- Loaded the wordpress-studio skill from the plugin and called
studio_instructionsto read the workflow; site_createto create the site, which ran athttp://localhost:8882;- Used
wp_clito check the current theme (Twenty Twenty-Five) and existing content; - I wrote three block markup files for the home page, the menu page, and the post, then validated them with
validate_blocks. All three passed. - Next, I used
wp_clito create the pages and the post, set the home page as the static front page, and changed the permalink structure to/%postname%/. take_screenshottook screenshots of the home page and the post page, and finally I checked the pages with curl.
When we opened the home page, the full-width Cover block, the "手冲咖啡实验室" heading, and the "查看菜单" button were all there, and the post page returned 200. It also went ahead and created a /menu/ The menu page gives the button somewhere to link to, and it reminds you that the prices in the menu are placeholder data that need to be replaced with real ones.
The post came out at around 400 words, longer than the 300 requested, and the reply pointed that out on its own.
Codex: 155 seconds (MCP connected manually)
For Codex, we gave it a task with the same structure: build a hiking blog called Trail Notes, with a homepage Cover title "Weekend Hiking Notes" and a button "Latest Routes", then publish a post titled "10 Pieces of Gear to Bring on Your First Hike."
The first time we used the plugin's built-in MCP, Codex called studio_instructions and never got a response. After waiting 5.5 minutes, it gave up on its own, with this reply:
这次没能完成建站:WordPress Studio 的 `studio_instructions` 请求一直没有响应,我已停止等待,也没有创建站点或发布文章。
We switched to the manual setup from the official docs: first, use the npm command from step one to install studio, then register it as a global MCP server in Codex:
codex mcp add wordpress-studio -- studio mcp
To avoid a conflict with the same-named server in the plugin, I also disabled the plugin in ~/.codex/config.toml:
[plugins."wp-studio@studio"]
enabled = false
I ran it again, and it finished in 155 seconds. Codex called studio_instructions, site_create, scaffold_theme, wp_cli, validate_blocks, inspect_design, and take_screenshot. The site is at http://localhost:8883, where the homepage Cover and buttons are all in place and the post page returns 200. One wp_cli call failed along the way. Codex reread the instructions, changed the command, and the second attempt succeeded.
Unlike Claude Code, Codex uses scaffold_theme generated a new theme, wrote the Cover block straight into the homepage template, and checked the result on both desktop and mobile. For how to set up MCP in Codex, see Codex MCP Minimal Loop.Test Summary
| Step | Claude Code | Codex |
|---|---|---|
| Install the plugin | 2 commands, about 2 seconds | 2 commands, about 2 seconds |
| Build site + Cover homepage + publish a post | 119 seconds, 21 rounds | Plugin MCP hung; 155 seconds after manual setup |
| Errors | None | Plugin MCP unresponsive; 1 wp_cli failure, then self-corrected |
| Homepage / post page | 200 / 200 | 200 / 200 |
Preview and publish
To view the local site, just open http://localhost:端口 in your browser. The admin is at /wp-admin. To show it to someone else, you can have the AI use Studio's preview feature, or run studio preview yourself to generate a temporary preview site. To go live, use studio push to push to a WordPress.com site. Both steps require you to log in to your WordPress.com account with studio auth first.
Give the AI enough permission to run commands. For how to open up network access and execution permissions in Codex, see Codex Network Access and Execution Environment Security Settings.
Common Errors
Node version too old
Cause: Studio CLI requires Node 22 or later (wp-studio in the engines says node >=22.0.0). On an older version, the npm install or plugin startup will fail.
Fix: Upgrade Node, then confirm the version:
node -v
MCP tools not found, or calls never return
Cause: The plugin's MCP server didn't start, or it started and then hung on the first step. What we hit in Codex was the latter: studio_instructions never returned.
Fix:
- In Claude Code, first run
/reload-pluginsor open a new session, then check the status withclaude mcp list. - If that still doesn't work, switch to manual setup:
npm i -g wp-studio, thencodex mcp add wordpress-studio -- studio mcp(the Claude Code equivalent isclaude mcp add wordpress-studio -- studio mcp), and turn off the same-named server in the plugin.
Untrusted HTTPS certificate
Cause: After you set a custom domain for the site and turn on --https, Studio issues the site certificate with its own root certificate. Until your system trusts that root, the browser will warn that the site is not secure.
Fix: The Studio 2.0 desktop app prompts you when it detects an untrusted certificate and offers a one-click way to trust it. If you only develop locally, you can also skip --https and just use http://localhost:端口.
Want to leave WordPress entirely?
Some people want to go the other way: have the AI convert an entire WordPress site into a static site like Astro, then deploy it to Vercel or Cloudflare. The idea is to export all posts and pages first, have the AI generate an Astro project, and build pages that follow the original link structure. Before you start, be sure to make a 301 redirect table that maps each old link to its new one. Otherwise your search rankings will drop.
It works in the other direction too. One person used Claude Code to migrate an entire HubSpot blog to WordPress, running automatically for about 6 hours.
Related Reading
- Connecting Claude Code to Third-Party APIs
- Codex Integration Setup Guide
- Codex MCP Minimal Loop
- Hands-On with the Claude Code Unreal Engine Plugin
- How to Use Skills in an AI Agent
Create an API Key and let Claude Code and Codex build your WordPress site →



