Claude Code writes the theme, GitHub stores it, VS Code pulls it to your computer and LocalWP shows it instantly. Set this up once and “I broke the site, how do I undo it?” stops being a question.
This guide walks through the workflow our agency uses on client projects: Windows install commands, the PowerShell vs CMD trap, linking the theme to a local site with a junction, the daily pull loop, 8 common mistakes and safe deployment to production.
mklink /J). Whenever Claude Code or a teammate pushes a change, click Pull in VS Code and the local site updates instantly. Deployment to the live site is automated with GitHub Actions after approval.The workflow: five links, one source
The core rule is simple: the GitHub repository is the single source of truth. No files are copied by hand and no changes are made in the WordPress admin. Every change is recorded in history and can be undone with one command.
| Tool | What it does | Cost |
|---|---|---|
| Git for Windows | Records changes as versions (commits) and syncs with GitHub. Claude Code also needs Git on Windows. | Free |
| GitHub | Where the repository lives in the cloud. Private repos are available; your team and Claude Code work from here. | Free plan is enough |
| VS Code | Code editor. Its Source Control panel lets you pull and push without typing commands. | Free |
| LocalWP (Local) | Installs WordPress on your computer in one click, with PHP, MySQL, a web server and SSL. | Free |
| Claude Code | Anthropic’s coding agent. Runs in the terminal, inside VS Code or on the web; edits the repo and pushes to GitHub. | Claude subscription or API |
Step 1: Install the tools
Open PowerShell from the Start menu. winget, built into Windows 10/11, is the fastest route; you can also download each program from its website. Download LocalWP from localwp.com.
Step 2: Set your Git identity
This is the step most people skip. Without it, the author in your Git history shows as “unknown”.
Step 3: Clone the repository with VS Code
Create a private repository on GitHub (e.g. example-site) or use the one you were given. Then clone it in VS Code to a short folder without spaces; C:\Projects works well. VS Code asks you to sign in with GitHub the first time.
Step 4: Create the local site in LocalWP
Open LocalWP, click + at the bottom left and choose “Create a new site”. The Preferred environment suits most projects. When it finishes, the “WP Admin” button opens the dashboard.
Step 5: Link the theme folder with a junction
This is the key step. Instead of copying the theme, you create a junction (a directory link) in the LocalWP site’s themes folder that points to the theme folder in your repo. One folder, visible in two places.
Then activate the theme in LocalWP under WP Admin → Appearance → Themes. To remove the link, delete only the junction in themes\example-theme; the real folder in the repo stays put.
Step 6: Work with Claude Code, receive with Pull
You can use Claude Code in three ways: type claude in a terminal inside the repo folder, use the VS Code extension, or use Claude Code on the web. On the web it pushes changes straight to GitHub; your job is to Pull in VS Code and check the result locally.
Add a CLAUDE.md file to the repo root with your colours, fonts, speed targets and content rules. Claude reads it every session and stays within your rules. Curious how AI agents work? Read how to build an AI agent.
The daily loop
1. Pull
First thing every session. A ↓ in the status bar means new changes have arrived.2. Test
Refresh the site in LocalWP; check desktop and mobile views.3. Feedback
Tell Claude Code what is wrong, with the page and screen width; it fixes and pushes.4. Approve
If it looks right, move on. Everything is in history; you can always roll back.Git commands worth knowing
| Command | What it does | When |
|---|---|---|
git pull | Downloads new commits from GitHub. | Start of every session |
git status | Shows whether your copy is up to date and which files changed. | Whenever unsure |
git log --oneline -10 | Lists the last 10 changes, one per line. | To see what changed |
git diff | Shows unsaved changes line by line. | Before committing |
git restore file | Discards an unsaved change. | When you broke a file by accident |
git revert <commit> | Creates a new commit that undoes an old one; history is kept. | To undo a released change |
8 common mistakes and the right way
Tap the cards: red shows the mistake, green shows the fix.
Which setup fits you?
Deploying safely to production
Moving approved changes to the live site can be automated too. GitHub Actions runs a workflow on every new commit to main that uploads the theme folder to your host over FTP or SSH. You need:
Secrets
FTP/SSH credentials never go in the repo; store them under GitHub → Settings → Secrets.Theme only
Deploy only the theme (and any custom plugin) folder; leave the database and uploads alone.Backup
Back up the host before the first automated deploy and keep LocalWP exports too.Cache
Clear the cache (LiteSpeed etc.) after deploying; bump the version number when CSS changes.For post-launch speed and SEO checks, see WordPress speed optimization and Search Console setup.
Setup checklist
Frequently asked questions
Is LocalWP free?
Yes. LocalWP (Local) is a free desktop app from WP Engine for Windows, macOS and Linux. It installs WordPress in one click and lets you switch PHP versions, export and clone sites.
What is the difference between a junction and copying the theme folder?
A copy creates two separate folders that you must sync by hand after every update. A junction shows one folder in two places: the moment you pull in the repo folder, the LocalWP site is updated too. The target path must not already contain a folder with the same name.
Do I need to be a developer to use Claude Code?
No, but you need the basic Git idea: changes are saved as commits, pushed to GitHub and received with Pull. Claude Code writes the code and pushes it; you test on the local site and approve. A CLAUDE.md file in the repo tells Claude your project rules.
Can I just upload files over FTP instead of using Git?
You can, but you lose history: who changed what and when, and which change caused a bug. With Git every change is a commit and you can roll back with one command. Deployment to the live site can also be automated with GitHub Actions.
Do the database and uploads go into Git?
Usually not. Git holds the theme, custom plugins and content source files. The database, uploaded media and files with secrets such as wp-config.php stay out of the repo and are backed up separately with LocalWP Export and your host’s backups.
How do I deploy to the live site?
The safest way is to let GitHub Actions upload approved changes to your host automatically. FTP or SSH credentials are stored in GitHub Secrets, never in the repo. Test locally and back up the live site before every release.
Let us set this up for you
GitHub repository, local development environment, Claude Code rules and automated deployment; your team just approves. WordPress management starts at $100 per month.
Free consultationCustom software developmentRelated: WordPress management · Is n8n free? · Multilingual website SEO · What is SEO? · Sources: Claude Code setup docs · LocalWP · Git. Screens are illustrations; versions and interface details may change.
