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.

Thanks, Agents (and welcome back, blog)

It’s been nearly five years since my last blog post. I’ve kept the site up during that time in case the archives were useful to anyone, but otherwise left WordPress-on-Dreamhost setup completely untouched for years.

Since I’ve been vibe-coding (a lot,) I figured I should try doing a bit of blogging to share some of what I found to work and not work in my experience.

When I logged into DreamHost to make a new post, I discovered that my WP installation was completely broken, and I just got a generic error message on any page that I tried to go to inside of the admin. Pre-AI encoding, I probably would have just given up because the effort to fix the blog was just not worth the time. However, AI saved the day.

I just told Claude Code what error message I was getting, and then it gave me instructions on exactly what to do and try, which included SSH-ing into the DreamHost box. Warp Terminal’s agent helped me write a cat command to find and dump the logs from several directories at once; I pasted those logs into Claude Code and it diagnosed a particular plug-in that was broken (and gave me the mv command to disable it.)

It worked. Now the blog is back.

Since the agents have been so helpful to me, hopefully I’ll now have some tricks to share in future posts to help with your agentic coding.