Connecting Claude Code to WordPress: Lowering the Friction to Sharing

I just hooked up Claude Code to my WordPress blog. The goal is to help me publish more — in recent years, many post ideas have died on the vine because the effort required to write and publish has been just a bit too high.

The Setup

The integration is surprisingly simple, and I had Claude Code figure everything out for me (it mostly got it in one shot.) WordPress has had a REST API for years, and since version 5.6, it supports “Application Passwords” – a way to create API credentials without exposing your main login. Here’s what I did:

  1. Created an Application Password in WordPress (Users → Profile → Application Passwords)
  2. Stored the credentials in a local file (~/.wp-credentials) that Claude Code can read
  3. Claude wrote a small shell script that wraps the WordPress REST API for creating posts

Now I can literally tell Claude “write a blog post about X” and Claude will produce an editable draft inside of WP.

Why Bother?

I’ve had this blog since the early 2010’s, but since ~2020 I’ve barely posted. In that time, I’ve had dozens of ideas for posts, but time has been at an extreme premium and producing a polished blog post was too much work.

With this setup, I can:

  • Jot down rough ideas – bullet points, stream of consciousness (perhaps captured by Wispr Flow, which I now use nearly every day,) 1/5th completed initial draft, whatever
  • Let Claude expand them – turn my notes into a proper draft with structure and context
  • Review and publish – I stay in the loop for quality control, but the heavy lifting is done

The goal isn’t to automate away my voice – it’s to reduce the friction between having an idea worth sharing and actually sharing it. E.g. with this post, Claude wrote ~80% of it, and I did a once-over to add/remove/tweak the final 20% (such as this sentence!)

Why This Matters

I’ll be real: virtual no one reads my blog (except in the rare occasions I’ve gotten a modest traffic bump from e.g. a Hacker News hit.) But human readership is starting to a matter less, because as Gwern and Tyler Cohen have pointed out on Dwarkesh, everything (at least anything of any quality) that humans write becomes part of the training corpus for future LLMs, and thus influences (even if in a miniscule way) the answers that millions/billions of people increasingly rely on.

That’s a pretty cool (if diffuse) motivation, and at least for the moment it’s strong enough to make me want to at least dip my toe back into the publishing game.

And as with nearly all things in life, lower friction leads to greater adherence with our goals

The Technical Details

For anyone who wants to set up something similar:

The WordPress REST API endpoint for creating posts is:

POST /wp-json/wp/v2/posts

With a JSON body like:

{
  "title": "Your Post Title",
  "content": "<p>Your HTML content</p>",
  "status": "draft"  // or "publish"
}

Authentication uses HTTP Basic Auth with your username and the Application Password. The whole thing is maybe 50 lines of bash to wrap nicely.

Claude Code can read local files and execute shell commands, so you can either have CC bundle everything into a script, or just grind out the API calls ad hoc in order to draft posts, check what’s already published, and push new content.

Just please, for all of our sakes, still review everything before it goes live.

What’s Next

I’m curious to see if this actually changes my publishing frequency. The setup took about 15 minutes. If it means I post even a few more times per year, that’s a win.

And yes, this post was drafted by Claude, edited by me, and published using the very workflow it describes. The dogfood tastes good so far.