Alright, let’s talk about something I’ve been experimenting with: hooking up Claude Code to a WordPress site through GitHub Actions. It sounds like a “why would you do that?” kind of setup — but once it clicks, it genuinely changes how fast you can move on a content site. This blog is solely based on my opinions and experiences.
Is it perfect? No. Is it worth knowing about? Absolutely.
What Are We Even Talking About?
The basic idea: Claude Code acts as your AI developer inside your repo. GitHub Actions handles the CI/CD pipeline. WordPress is the live site on the other end. Together they form a loop where you describe a change, Claude Code implements it, and GitHub Actions ships it — without you manually FTPing files at midnight like it’s 2008.
The workflow I used is loosely based on a project I did for my partner’s website. Nothing enterprise-scale, but it was a perfect real-world sandbox to figure out what works and what bites back.
The Benefits
1. Speed of Development
Claude Code can scaffold a WordPress theme, write custom PHP functions, or update CSS faster than manually hunting through the WordPress customizer. You describe what you want in plain English and get working code. It’s genuinely fast.
2. Version Control for Everything
Keeping your WordPress theme and plugins in a Git repo means every change is tracked. Combined with GitHub Actions, you get automated deployments — push to main, the site updates. No more “who changed what and when.”
3. Consistent Code Quality
Claude Code follows patterns. If your theme has a structure, it respects it. No random inline styles or mystery functions that only work on full moons.
4. CI/CD for a CMS
WordPress isn’t exactly known for its DevOps story. Slapping a GitHub Actions pipeline on top of it brings it into the modern era — automated linting, syntax checks, and deployments before anything touches production.
5. Great for Templated Sites
If the site is mostly content-driven and the theme doesn’t change drastically, this setup is a well-oiled machine. Build once, maintain with confidence.
The Drawbacks
1. WordPress Is Still WordPress
The database lives outside your repo. Content, users, settings — all of it is in MySQL, not Git. Claude Code can manage your theme and plugins, but it can’t push a blog post to the database. That’s still a manual/WP-Admin job.
2. Plugin Complexity
The WordPress plugin ecosystem is vast and messy. Claude Code is great at writing clean custom code, but it can’t predict conflicts with a plugin that was last updated in 2019 and still somehow powers half the site.
3. Hosting Constraints
Not every WordPress host plays nicely with SSH-based deployments. Some shared hosts are locked down. You’ll need SSH access or SFTP credentials wired into your GitHub secrets for the pipeline to work. Check your host first.
4. Context Window Limits
Big themes with a lot of interconnected template files can push the limits of what Claude Code can reason about in one shot. You’ll want to keep things modular.
5. AI Isn’t a QA Team
Claude Code will write what you ask for. It won’t necessarily catch visual regressions or mobile layout issues. You still need to eyeball the site after a deployment.
The Stack at a Glance
| Layer | Tool | Role |
|---|---|---|
| AI Developer | Claude Code | Writes and edits theme/plugin code |
| Version Control | GitHub | Stores and tracks the codebase |
| CI/CD | GitHub Actions | Automates testing and deployment |
| CMS | WordPress | Serves the live site |
| Deployment | SSH / rsync | Syncs files from repo to server |
High-Level Setup: Step by Step
Step 1 — Structure Your Repo
Keep your WordPress theme (and any custom plugins) in the repo. A clean layout looks like this:
/
├── .github/
│ └── workflows/
│ └── deploy.yml
├── wp-content/
│ ├── themes/
│ │ └── your-theme/
│ └── plugins/
│ └── your-custom-plugin/
└── README.md
Only track what you own. Don’t commit WordPress core or third-party plugins you installed through WP-Admin.
Step 2 — Wire Up GitHub Secrets
In your GitHub repo, go to Settings → Secrets and variables → Actions and add:
SSH_HOST— your server’s IP or hostnameSSH_USERNAME— the SSH userSSH_PRIVATE_KEY— your private key (the server should have the public key in~/.ssh/authorized_keys)REMOTE_PATH— the absolute path to your WordPress install on the server (e.g.,/var/www/html)
Step 3 — Write the GitHub Actions Workflow
Create .github/workflows/deploy.yml:
name: Deploy to WordPress
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Deploy via rsync over SSH
uses: burnett01/rsync-deployments@7.0.1
with:
switches: -avz --delete --exclude='.git*'
path: wp-content/
remote_path: $/wp-content/
remote_host: $
remote_user: $
remote_key: $
This pushes only your wp-content/ folder — themes and custom plugins — leaving WordPress core untouched.
Step 4 — Use Claude Code to Make Changes
This is where it gets fun. Open Claude Code in your repo and describe what you want:
“Add a sticky header to the theme that hides on scroll down and reappears on scroll up.”
Claude Code edits the relevant PHP template and CSS files. You review the diff, commit, and push. GitHub Actions picks it up and deploys to the live site automatically.
Step 5 — Validate on the Live Site
After each deployment, do a quick visual check. Claude Code doesn’t browse your live site — that part is still on you. Check mobile, check the key pages, and confirm nothing exploded.
Step 6 — Protect Production with Branch Rules
Set main as a protected branch. Require at least one review (even if it’s just you doing a self-review) before merging. This adds a checkpoint so you’re not accidentally deploying half-finished work.
Verdict?
For a WordPress site where you actually care about code quality and want a real deployment pipeline — this setup is absolutely worth it. It took a bit of upfront configuration but the payoff is a clean, version-controlled, AI-assisted workflow that makes changes feel a lot less scary.
Is it overkill for a five-page brochure site? Maybe. But if you’re maintaining a growing content site and you want to move fast without breaking things, getting Claude Code and GitHub Actions in the loop is a solid move.
Ease of Setup: 3.5/5 — The hardest part is SSH keys and hosting constraints.
Day-to-Day Value: 4.5/5 — Once it’s running, it’s genuinely great.
References
- Claude Code — https://claude.ai/code
- GitHub Actions — https://docs.github.com/en/actions
- WordPress — https://wordpress.org
- rsync-deployments Action — https://github.com/burnett01/rsync-deployments