NEWIs your brand growing in revenue, search and AI?Where does your brand stand? Free growth analysis →

Blog · WordPress

WordPress Git Workflow: LocalWP, VS Code & Claude Code

Build WordPress themes with Git: Windows install commands, cloning with VS Code, LocalWP and junctions, working with Claude Code, 8 mistakes and safe deployment.

11 min read Updated: November 8, 2026 Author: Erdal Ural
WordPress Git Workflow: LocalWP, VS Code & Claude Code
Hands-on guide · WordPress development

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.

Short answer: To build WordPress with Git, keep your theme files in a GitHub repository, clone it with VS Code to a short folder (e.g. C:\Projects), create a local site in LocalWP and link the theme folder into it with a junction (CMD: 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.

Workflow between Claude Code, GitHub, VS Code, LocalWP and the live site1 · WritesClaude Codetheme and contentchanges2 · StoresGitHubevery changeis a commit3 · PullsVS Codeone clickto your PC4 · TestsLocalWPvia junctionlive preview5 · ShipsHostingGitHub Actionsor FTPThe theme folder lives in the repo; LocalWP “sees” it through a junction.The moment you pull, the local site is updated; just refresh the browser.
GitHub is the single source of truth. No file is ever copied by hand.
ToolWhat it doesCost
Git for WindowsRecords changes as versions (commits) and syncs with GitHub. Claude Code also needs Git on Windows.Free
GitHubWhere the repository lives in the cloud. Private repos are available; your team and Claude Code work from here.Free plan is enough
VS CodeCode 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 CodeAnthropic’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.

Installing Git, VS Code and Claude Code with PowerShellWindows PowerShell# 1) Git for Windows and VS CodePS C:\Users\user> winget install –id Git.Git -e –source wingetPS C:\Users\user> winget install –id Microsoft.VisualStudioCode -e# 2) Claude Code (native Windows install)PS C:\Users\user> irm https://claude.ai/install.ps1 | iex# 3) Open a new PowerShell window and checkPS C:\Users\user> git –versiongit version 2.x.x.windows.1PS C:\Users\user> claude –version2.x.x (Claude Code)
Open PowerShell from the Start menu. Your version numbers will differ; what matters is that the commands run without errors.

Step 2: Set your Git identity

This is the step most people skip. Without it, the author in your Git history shows as “unknown”.

Setting your Git identityWindows PowerShellPS C:\Users\user> git config –global user.name “Your Name”PS C:\Users\user> git config –global user.email “you@example.com”PS C:\Users\user> git config –global –listuser.name=Your Nameuser.email=you@example.com
You only do this once. Skip it and your commits show the author as “unknown”, so nobody can tell who changed what.

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.

Git: Clone in the VS Code command paletteexample-site — Visual Studio Code1EXPLOREREXAMPLE-SITEREADME.mdCLAUDE.mdcontent/wp-content/ themes/ example-theme/ > Git: CloneGit: CloneGit: Clone (Recursive)GitHub: Clone
Ctrl+Shift+P → “Git: Clone” → repository URL → choose C:\Projects as the folder. The tree on the left is what you see when cloning finishes.

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.

Creating a new local WordPress site in LocalWPLocal● example-siteAll sites+Create a new site1Site nameexample-site → address: example-site.local2Environment: PreferredPHP, web server and MySQL picked for you3WordPress userusername and password valid on this computer only4Add Siteapprove the admin prompt if asked (hosts file)Add Site
An illustration of the LocalWP screen. Start with the + button at the bottom left; four steps and the local site is ready.

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.

Linking the theme folder to the LocalWP site with a junctionCommand Prompt / PowerShellREM Command Prompt (CMD) — type as one line:C:\> mklink /J “%USERPROFILE%\Local Sites\example-site\app\public\wp-content\themes\example-theme” “C:\Projects\example-site\wp-content\themes\example-theme”Junction created for …\themes\example-theme <<===>> C:\Projects\…\example-themeREM In PowerShell, use this instead of mklink:PS C:\> New-Item -ItemType Junction -Path “$env:USERPROFILE\Local Sites\example-site\app\public\wp-content\themes\example-theme” -Target “C:\Projects\example-site\wp-content\themes\example-theme”
mklink only works in CMD; in PowerShell you get “mklink is not recognized”. Each command is a single line, wrapped here for readability. The target folder (themes\example-theme) must not exist yet.

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.

Pull from the VS Code Source Control menuexample-site — Visual Studio Code1SOURCE CONTROLEXAMPLE-SITEmain ↓1CHANGES(clean) Source Control ···PullPushFetchSync
Source Control in the left bar (Ctrl+Shift+G) → ··· → Pull. “↓1” in the status bar means GitHub has 1 new commit you do not have yet.

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.
Everyday Git commandsWindows PowerShellPS C:\Projects\example-site> git pullUpdating 3f2a1c9..5da6b6c Fast-forwardPS C:\Projects\example-site> git log –oneline -35da6b6c Service page copy updated3f2a1c9 Home page slider made fasterPS C:\Projects\example-site> git statusOn branch main · Your branch is up to date with ‘origin/main’.
“Fast-forward” means a clean update. If git status says “up to date”, your local copy matches GitHub.

Git commands worth knowing

CommandWhat it doesWhen
git pullDownloads new commits from GitHub.Start of every session
git statusShows whether your copy is up to date and which files changed.Whenever unsure
git log --oneline -10Lists the last 10 changes, one per line.To see what changed
git diffShows unsaved changes line by line.Before committing
git restore fileDiscards 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?

How do you work?
Solo: Repo + LocalWP + junction is enough. You edit in VS Code, then commit and push.
Git + VS Code
LocalWP
Auto deploy
With Claude Code: Claude writes and pushes; you pull, test and approve. CLAUDE.md is the most important file.
Pull + test
CLAUDE.md rules
Feedback
Team: Everyone works on a branch; changes are reviewed in a pull request before merging to main.
Branch + pull request
Code review
Auto deploy
Client handover: Client approval happens on the local or a staging site; GitHub Actions deploys only the approved main branch.
Staging + approval
GitHub Actions
Backups
No coding: Have this set up once; afterwards you only pull and test. Or leave the site to our WordPress management service.
Setup support
Pull + test
Managed service

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 development

Related: 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.

Hands-on guide: Build a WooCommerce store with Claude Code, Docker, PowerShell and GitHub, with CLAUDE.md, skill and subagent examples: How to use Claude Code →

Open to new projects this week

Let’s map your growth together.

In a 30-minute strategy session we listen to your goals, review your market and competitors, and come back with a clear plan and a fixed monthly fee.

Start with a free AI analysis
Reply within 1 business dayNo commitmentNo commission on ad spend
01Market and competitor diagnosis
02AI visibility score
0390-day growth plan
Chat on WhatsAppCall now