Skip to content
Yaakov Tzedek
Guides

How to Build a WordPress Site with Claude Code: The Complete 2026 Guide

From zero to a live site: setup, hosting, a custom theme, a plugin, security and GEO. Build a WordPress site with Claude Code, step by step.

By Yaakov Tzedek · · 11 min read

WordPress with Claude Code: management, content and automation in plain language

From zero to a live site: setup, hosting, a custom theme, your own plugin, integrations, security and visibility in AI answer engines. Everything you need to build a WordPress site with Claude Code in the age of AI, step by step.

What is Claude Code?

Short answer: Claude Code is Anthropic's AI coding agent. It runs in your terminal (and also in IDEs and a desktop app). Unlike a regular chat, it reads, creates and edits files, runs commands, checks results and fixes its own mistakes, which makes it one of the most practical tools for WordPress projects in 2026.

While tools like ChatGPT answer in a chat and Cursor helps you write code in an editor, Claude Code goes a step further: it carries out the whole task itself. You explain what you want, and it creates the files, runs the commands and checks that everything works.

What is an "AI agent"? An AI agent is a system that performs complex tasks independently, combining reasoning, tool use (files, commands) and self-correction. Where a chat answers, an agent executes a task and reports the results.

How it differs from Cursor and GitHub Copilot

ToolHow it worksBest for
GitHub CopilotAI assistance inside the editorExperienced developers writing code
CursorChat-based AI code editorWorking on the code as you write
Claude CodeAutonomous agentEnd-to-end tasks, complete WordPress sites

Why build WordPress with AI in 2026?

Short answer: three reasons: much faster builds, less dependence on an outside developer, and the ability to maintain and grow the site yourself. Claude Code is the difference between "I'm waiting weeks for a small fix" and "I changed the site in 10 minutes".

According to W3Techs, WordPress powers about 38.5% of all websites, and about 57.5% of sites whose content management system is known. That makes it the natural first arena for AI in web development. Moving to AI is not a "nice to have", it is a competitive necessity.

According to the GEO research paper by Princeton, Georgia Tech, the Allen Institute for AI and IIT Delhi (KDD 2024), optimization methods such as adding citations, quotations and statistics improved visibility in generative engine answers by up to 40%.

Prerequisites

Short answer: three things: a computer that meets Claude Code's requirements, a paid Claude plan (Pro or higher), and a domain. Basic HTML knowledge helps a lot but is not required.

Hardware and software:

  • A computer (macOS 13+, Windows 10 1809+, or a recent Linux) with at least 4 GB of RAM; more is better if you also run a local WordPress environment
  • A terminal or PowerShell (installed by default)
  • VS Code, the recommended free code editor (optional)
  • Node.js is not required for the recommended native installer; it is only needed if you install Claude Code through npm (Node.js 22 or later)

Accounts: a Claude plan that includes Claude Code (Pro, Max, Ultra, Team or Enterprise; the free plan does not include it), a free GitHub account, a hosting account and a domain.

Step 1: Choose your hosting

Short answer: managed WordPress hosting is the right choice, not generic shared hosting. Look for daily backups, a built-in CDN, security scanning and support that answers fast.

For a WordPress site built with Claude Code, you want hosting that offers: SSH access, a current PHP version (8.2+), WP-CLI preinstalled, a staging environment and free automatic SSL.

What is managed WordPress hosting? A service where the host handles the technical side: security updates, performance, backups, caching and CDN. The server is tuned specifically for WordPress, which usually means faster load times and fewer things for you to maintain.

💡 Tip: if you build sites for non-technical clients, choose a managed host with a simple control panel and responsive support in your clients' language. It makes handover much easier.

Step 2: Install Claude Code

Short answer: installation takes a few minutes with one command in the terminal. After the first sign-in to your Claude account, the tool is available from any folder.

# Recommended: native installer (macOS, Linux, WSL)
curl -fsSL https://claude.ai/install.sh | bash

# Windows PowerShell
irm https://claude.ai/install.ps1 | iex

# Check the version
claude --version

# Start your first session
mkdir my-wp-site && cd my-wp-site
claude

On first run, a browser opens so you can sign in to your Claude account. Approve, return to the terminal and try a first prompt. The full instructions, including Homebrew, WinGet and npm options, are in the official setup docs.

⚠️ Common pitfalls: never install with sudo. If you see command not found after installing, open a new terminal window; if it persists, the install folder is not on your PATH yet, and the troubleshooting page explains how to fix it. Native installs update themselves automatically.

Step 3: Set up a local development environment

Short answer: before going to a live server, build the site on your own computer. The recommended tool is Local: free, installed in minutes, and it spins up a full WordPress site in under a minute.

Why local first? Fast development without depending on the internet, room to make mistakes without hurting a live site, thorough testing before upload, and Claude Code works directly with the local files.

Download Local from localwp.com, create a new site (PHP 8.2, MySQL 8, Nginx), open the site folder in VS Code and run claude in the terminal.

💡 Tip: Local has an "Open Site Shell" button that opens a terminal with WP-CLI ready. Combine it with Claude Code and development speeds up dramatically.

Step 4: Create the site on the server

Short answer: set up the site on your host in parallel with the local work, so you can test in a staging environment at every stage.

Setup order: a clean WordPress install (not a pre-built template), domain configuration, PHP 8.2+, an admin user with a strong password, staging enabled, SSL, and your SSH/SFTP details saved for the deployment stage.

Step 5: Build a theme

Short answer: the theme is the visual layer. With Claude Code you can build a custom theme in a few hours instead of days. Start with static HTML, convert it to PHP, then add dynamic content.

The winning workflow: the secret is in the order:

  1. Plan: sketch the design (Figma or paper) before you talk to Claude. It saves a lot of time.
  2. CLAUDE.md: a project context file with the goal, brand colors, fonts and coding style.
  3. Static HTML first: build the page as plain HTML and check it in the browser.
  4. Convert to PHP: only when the HTML is right, convert it into a WordPress template.
  5. Dynamic content: connect it through the Customizer or ACF.
  6. Mobile and languages: test at every screen size, mobile first. If you serve a right-to-left language, add RTL support from day one.
  7. Performance: run a Lighthouse audit with a target of 90+ on mobile.

Suggested prompt: Create a WordPress theme called "my-business-theme" with a valid style.css, an index.php with The Loop, and a functions.php with support for title-tag, post-thumbnails and translations. Add an assets/ folder with separate CSS and JS, and briefly explain what each file does.

💡 Prefer a visual builder to writing code? Not everyone wants to build a theme from scratch. If you prefer drag-and-drop page building, Elementor now includes a built-in AI layer that writes text, generates images and builds whole sections inside the editor. You can combine the two: Elementor for visual building, Claude Code for custom plugins and complex logic.

Multilingual and RTL support

If your site serves a right-to-left language such as Hebrew or Arabic, build RTL support from day one. Do not leave it to the end:

// RTL stylesheet support
function enqueue_rtl_styles() {
    if ( is_rtl() ) {
        wp_enqueue_style( 'theme-rtl', get_template_directory_uri() . '/style-rtl.css' );
    }
}
add_action( 'wp_enqueue_scripts', 'enqueue_rtl_styles' );

Step 6: Build your first plugin

Short answer: a plugin is any functionality that is not about design: a contact form, a testimonials system, a floating chat button. The golden rule: design goes in the theme, functionality goes in a plugin.

5 ideas for a first plugin: a floating WhatsApp button, a customer testimonials system (Custom Post Type), a booking or appointment request form, a custom field validator, and an internal lead system that forwards leads to your CRM.

Suggested prompt: Build a WordPress plugin for customer testimonials: a Custom Post Type, 5 meta fields, a "Category" taxonomy, a shortcode, a Gutenberg block in React, and responsive CSS. Clean OOP structure with proper sanitization and escaping. Compatible with WordPress 7.1+ and PHP 8.2+.

Step 7: Essential integrations

Short answer: a business site in 2026 needs to talk to a CRM, an email platform, payments and an AI chatbot. Claude Code cuts integration work from a day to well under an hour in many cases.

ServiceUseComplexity
monday.comCRM and lead managementMedium
MailerLiteEmail marketing and automationEasy
Stripe or PayPalPaymentsMedium
Green APISending WhatsApp messages (guide)Easy
Claude APIAI chatbot / content writingMedium

⚠️ Security: never put API keys in code. Store them in wp-config.php as constants or in environment variables. Claude Code does this correctly if you ask. For smarter integrations, look at MCP servers.

Step 8: Security and performance

Short answer: a mandatory step before launch: security review, performance optimization and mobile testing. Wordfence for security, WP Rocket for performance, and Lighthouse with a 90+ mobile target.

Security checklist, 9 points:

  1. Strong passwords for all users
  2. Two-factor authentication (2FA) for admins
  3. Hide the WordPress version from the HTML
  4. Limit login attempts
  5. Disable file editing from wp-admin
  6. Scan code with Wordfence or Sucuri
  7. SSL active and internal URLs on https
  8. Automatic backups
  9. Check sanitization and escaping in all custom code

Performance: convert images to WebP plus lazy loading, minify CSS and JS, caching (page and object), a CDN, and clean up old revisions in the database.

💡 Security prompt: Audit all my custom code (theme and plugin) against the OWASP Top 10 and the WordPress Coding Standards. Give me a numbered list of issues with severity, and fix each one separately with a short explanation.

Step 9: Go live

Short answer: launching means a local backup, database export, upload to the server, import, URL update and testing. With managed hosting, much of this happens in the control panel, often with a built-in migration tool.

Launch order: local backup → upload to the server → point DNS → enable SSL → search and replace the URL (wp search-replace 'old' 'new') → check links → test forms → test mobile → set up Google Analytics 4 and Search Console.

Step 10: Get found with GEO

Short answer: a site without promotion is a shop without a sign. In 2026 promotion has two sides: traditional SEO for Google, and GEO for AI search (ChatGPT, Claude, Perplexity, Google AI Overviews).

What is GEO (Generative Engine Optimization)? Optimizing content so it gets cited in the answers of generative AI engines: ChatGPT, Claude, Perplexity, Google AI Overviews, Gemini and Copilot. Where SEO aims for rankings, GEO aims to be included in the answer itself.

Ranking well in Google no longer guarantees showing up in AI answers. An Ahrefs analysis of 15,000 prompts found that only 12% of links cited by ChatGPT, Gemini and Copilot appear in Google's top 10 for the same query.

The iron rules of GEO

  1. Answer first: every section opens with a direct answer of up to about 40 words.
  2. Short paragraphs: 2 to 3 sentences at most.
  3. Statistics with sources: back every claim with a number and a named source.
  4. Lists and structure: bullets, tables and numbered steps are easy to extract.
  5. Standalone definition blocks: for every concept, a paragraph that answers "what is X?".
  6. Headings as questions: H2 and H3 headings that capture fan-out queries.
  7. Cover sub-questions: AI engines break a query apart, so cover the sub-questions.
  8. Valid JSON-LD: Article plus FAQPage.
  9. Fresh content: AI engines favor recently updated sources.

You can apply these rules by hand, with Claude Code helping you restructure pages, add schema and write answer-first sections. If you publish at scale, there is also a growing category of GEO content and monitoring tools that automate keyword research, structured content, rank tracking across Google and AI engines, and publishing to WordPress. Compare a few before you commit.

💡 A winning combination: Claude Code to build the site, plus a consistent GEO content process. The first solves development; the second solves content and visibility. Together you get a site that generates leads, not one that just "exists online".

Real costs

Short answer: the main recurring costs are your domain, managed hosting and a Claude plan. Compared with commissioning a site from an agency, building it yourself with Claude Code is usually far cheaper, at the cost of your own time.

ItemEstimated costRequired?
Domain (.com)Typically $10 to $20 a yearYes
Managed hosting (basic plan)Varies by providerYes
Claude Pro (for development)$20 a month ($17 a month billed annually)Yes (or higher)
Claude Max / Ultra (heavy use)$100 / $200 a monthAs needed
GEO / SEO toolsDepends on the toolRecommended
Premium pluginsVariesAs needed

Prices from claude.com/pricing at the time of this update.

5 common mistakes

Short answer: skipping planning, starting to code without a CLAUDE.md, mixing theme and plugin, neglecting mobile and language support, and compromising on security. All of them can be prevented with a little up-front planning.

  1. Skipping planning: "build me a site" returns generic code. Spend 30 minutes on a sketch and a CLAUDE.md.
  2. Mixing theme and plugin: design goes in the theme, functionality in a plugin. Otherwise, changing the design means losing everything.
  3. Leaving RTL or multilingual support to the end: "we'll handle it later" means an extra day of work and bugs. If you need it, plan it from day one.
  4. An "admin/admin" password: the number one attack vector. Use random passwords plus 2FA.
  5. No backups: keep at least one extra backup off the server.

Bottom line

Building a WordPress site with Claude Code is not a trick; it is the new way to develop websites in 2026. The time savings, the quality and the independence turn the tool from "nice to have" into a competitive necessity.

The winning stack: Claude Code for building and development, managed hosting, and a GEO content process for visibility in search engines and AI. That stack takes you from "idea for a site" to "a site that generates leads" in less than a month.

Want to learn to work with Claude Code, or bring AI into your organization? See my courses, lectures, AI implementation services, or talk to me about consulting.

Frequently asked questions

Can I really build a full WordPress site with Claude Code without knowing how to code?

Yes, you can build a simple WordPress site with Claude Code even without a programming background. A basic understanding of HTML and site structure shortens the learning curve. Complex projects need a better grasp of WordPress architecture, but you do not have to write the code yourself: the key skill is writing clear technical prompts.

How long does it take to build a WordPress site with Claude Code?

In our experience, a basic business site with 5 to 7 pages can be built in 2 to 4 working days instead of 2 to 3 weeks the traditional way, and a full commercial project in 7 to 10 days. Time savings typically land around 60% to 75%, depending on the project.

What is the difference between Claude Code and Cursor or GitHub Copilot?

Claude Code works as an agent: it reads, writes and runs files autonomously, from the terminal, an IDE extension or the desktop app. Cursor is an AI-powered code editor; Copilot started as an autocomplete assistant inside the editor. Claude Code is especially suited to WordPress because it can scan the folder structure, run WP-CLI and manage the project end to end.

Which hosting is best for a WordPress site built with Claude Code?

Managed WordPress hosting is the right choice for most sites. Look for SSH access, a current PHP version (8.2 or later), WP-CLI, a staging environment, daily backups, a CDN and free SSL. These features save you manual optimization and make deployment from Claude Code straightforward.

Can Claude Code write complex WordPress plugins?

Yes. Claude Code can build full plugins with Custom Post Types, Gutenberg blocks in React, the REST API and integrations. Commercial plugins headed for WordPress.org still need a security review and compliance with the WordPress Coding Standards, but the code base can come from Claude Code.

How do I get a WordPress site cited by AI engines like ChatGPT and Google AI Overviews?

Through GEO (Generative Engine Optimization): content with direct answers, statistics with sources, short paragraphs, structured lists, JSON-LD schema and coverage of sub-questions. You can apply these principles by hand with Claude Code's help, or use one of the growing number of GEO content and monitoring tools to scale the work.