Build your WordPress site by talking to Claude

A plain-language guide to connecting Claude to a WordPress site and letting it build pages, posts and settings for you, one instruction at a time.

What this site is

This site is a working notebook about connecting Claude (Claude Code) to a WordPress site and building with it. It is also the proof of concept: the page you are reading was written and published by Claude through the WordPress REST API, from a single instruction.

The site is a sandbox. Nothing here is precious, which makes it a good place to learn what works before you try the same thing on a site that matters.

How the connection works

Four steps, and the password never goes through the chat.

1. Create an application password

In wp-admin, open Users, then Profile, and scroll to Application Passwords. Create one and give it a name you will recognise. You can revoke it at any time.

2. Keep it in a local file

Save the password in a .env file on your own computer. Do not paste it into the chat. Claude never opens or reads that file.

3. Run a small helper script

A short script reads the .env file and sends requests to the WordPress REST API. Claude runs the script; the script holds the secret.

4. Test, then work

First a read-only test, such as listing your pages. Then a write test, such as creating a draft page. After that, give real instructions.

What you can ask for

You describe what you want in plain words. Claude carries it out and reports back with a link so you can check the result. For example:

  • “List all my pages and tell me which are still drafts.”
  • “Write an About page and save it as a draft.”
  • “Publish the draft and make it the front page.”
  • “Add a category called Guides and put these posts in it.”
  • “Change the site tagline to something shorter.”

The REST API covers pages, posts, media, categories and site settings. A few things, such as some theme and plugin screens, still need wp-admin in the browser.


What comes next

More guides will be added here as they are written and tested: the first-time setup in detail, building a multi-page site, working with media, and the places where you still need the browser. Practise on a sandbox site first, and revoke the application password when you are done.