How to automate WordPress SEO with Claude Code and earn more from organic traffic
Most WordPress site owners know they “should” do SEO, but the reality is brutal: technical audits, plugin configs, keyword research, content writing, and endless tweaks can eat hundreds of hours. With Claude Code and a few supporting tools, you can automate almost all of it—while actually improving your rankings and revenue.
This guide breaks down a complete Claude Code workflow for WordPress SEO: from site audits and plugin setup to keyword research, blog posts, service pages, and even optimization for AI search results like ChatGPT, Gemini, and Claude.
Why automate WordPress SEO with Claude Code?
Traditional SEO on WordPress is a grind: manual audits, fixing errors one by one, configuring plugins you barely understand, and writing content that may never rank or convert. Claude Code turns this into a managed workflow where you act as the strategist and Claude does the execution.
With the right setup, you can:
- Audit your entire site and fix most issues in one workflow
- Install and configure SEO plugins automatically
- Generate money-making blog posts and service pages on demand
- Optimize for on-page, technical, and AI-powered search in one pass
- Bundle everything into reusable “skills” you can trigger with a simple command
If you want a broader view of what Claude Code can automate beyond WordPress, you may also like this deep-dive on automating blog posts, service pages, and technical SEO with Claude Code.
Step 1: Run a full SEO audit with SEMrush and Claude Code
The first step is to diagnose your current site. Most WordPress sites have dozens of errors and hundreds of warnings—far more than most business owners will ever manually fix.
Set up a SEMrush site audit
1. Create a SEMrush project. Sign up for SEMrush and go to SEO → Site Audit. Create a new project and enter your domain.
2. Choose what to crawl. You can let SEMrush crawl the whole website, or, if you have a sitemap (e.g. /sitemap.xml), use the sitemap URL so SEMrush can find all important pages quickly.
3. Run the audit. SEMrush will scan your site and return a health score plus errors, warnings, and notices across areas like:
- Core Web Vitals and performance
- Crawlability and internal links
- HTTPS and security
- Meta tags, headings, and more
Connect SEMrush to Claude via MCP
To let Claude Code work directly with your SEMrush audit, you connect SEMrush as a “connector” (MCP server) inside Claude:
- Open claude.ai and go to Settings → Connectors
- Search for and add the SEMrush connector
- Set it to Always allow so Claude can pull audit data automatically
Now Claude can fetch your latest SEMrush site audit inside VS Code with a single prompt, instead of you downloading and parsing reports manually.
Use Claude Code to fix audit issues automatically
Inside VS Code, you:
- Create a new project folder (e.g.
wordpress-seo) - Install the Claude extension and connect your account
- Add a prompts file (e.g.
prompts.md) with a prepared prompt that tells Claude to:
- Pull the latest SEMrush audit
- Analyze your WordPress setup (theme, plugins, structure)
- Safely apply fixes across the site
- Maintain a detailed changelog so you can revert if needed
Claude then systematically works through your SEMrush errors and warnings, updating your WordPress site via a secure connection (covered in the next section). You can rerun the SEMrush audit afterwards to see your score jump—often from something like 60% into the 80s or higher in a single pass.
Step 2: Connect Claude Code directly to WordPress
To let Claude actually change things on your site—create posts, edit pages, install plugins—you connect it to WordPress through a bridge plugin.
Install the Nova Mira connector plugin
The workflow looks like this:
- Download the Nova Mira WordPress plugin as a ZIP
- In your WordPress admin, go to Plugins → Add New → Upload Plugin and upload the ZIP
- Activate the plugin, then generate an application password or connection token
- Nova Mira will give you a connection snippet or credentials
You paste this connection data into Claude Code (usually in a prompt or config file), and from that point on, Claude can:
- Create and edit posts and pages
- Install and configure plugins
- Modify themes and templates
- Keep a changelog of everything it touches
Combined with the SEMrush connector, you now have a loop: SEMrush finds problems, Claude reads the report, then Claude updates WordPress directly.
Step 3: Auto-install and configure essential SEO plugins
Plugins are powerful, but misconfigurations and conflicts can tank performance or even break your site. Claude Code can handle both installation and configuration for you.
A common starter stack for WordPress SEO in this workflow includes:
- Yoast SEO – on-page SEO basics, meta tags, sitemaps
- W3 Total Cache – caching, minification, and performance
- ShortPixel – image compression and optimization
Let Claude install and configure plugins
You create a documentation file (e.g. wordpress-plugins.md) that explains:
- Which plugins to install
- How to configure each one for SEO and performance
- How to avoid conflicts between plugins
Then you run a prompt that tells Claude to:
- Install Yoast SEO, W3 Total Cache, and ShortPixel
- Read your plugin guide file
- Apply best-practice configurations automatically
- Use your ShortPixel API key (stored securely, e.g. in a
.envfile)
Claude will, for example, disable unnecessary author archives in Yoast, configure caching rules in W3 Total Cache, and set up compression defaults in ShortPixel—without you clicking through dozens of screens.
Step 4: Find winning keywords with SEMrush (the right way)
Not all keywords are worth your time. Some bring the wrong audience, some are too competitive, and some have almost no search volume. The workflow here focuses on two page types:
- Blog posts (informational content that builds authority)
- Service pages (money pages that convert visitors into customers)
Keyword research for blog posts
Use the SEMrush Keyword Magic Tool and start with a broad root term (e.g. “plumbing”). Then filter:
- Volume: at least ~100 searches/month
- Intent: set to Informational for blog content
- Keyword Difficulty (KD): around 30 or less to start, increasing as your domain authority grows
Switch to the Questions tab to find blog-friendly queries like:
- “how much does a plumber cost” (high buying intent)
- “how to use a plumbing snake” (DIY topic that still builds authority)
Save strong candidates to a keyword list (e.g. “Plumbing Blogs”), then export them as a CSV and drop that file into your Claude Code project. Claude can then automatically expand, filter, and cluster these keywords for you.
Keyword clusters: take more “shots” per page
Instead of targeting a single keyword per article, Claude builds keyword clusters—one primary keyword plus several closely related secondary keywords. This is like taking five shots at the free-throw line instead of one: your odds of ranking for at least some of them go way up.
Claude can read your CSV of candidate keywords, apply filters (volume, difficulty, intent), and then generate a keyword-clusters.md file with structured clusters ready to turn into content.
Keyword research for service pages
For service pages, you’re targeting transactional intent—keywords people type when they’re ready to buy or book:
- In Keyword Magic Tool, set Intent to Transactional
- Lower the volume filter (e.g. 30+ searches/month) since even low-volume money terms can be profitable
- Filter for keywords with a non-zero CPC (cost per click). If advertisers are paying for clicks, there’s money in that term.
Extract the core services (e.g. “emergency plumber”, “water heater repair”, “drain cleaning”) and ignore “near me” variations—Claude will handle location targeting later. Export these to a separate CSV (e.g. service-keywords.csv) for your money pages.
Step 5: Generate high-quality blog posts with your own voice
Most AI-generated blog posts read like bland, generic “AI slop.” To stand out—and keep users on the page—you want content that sounds like a real human, ideally like you or your brand.
Train Claude on your writing style
Create a writing-style folder in your project and feed Claude samples of your real-world communication, such as:
- Emails (via the Gmail connector)
- Website copy
- LinkedIn posts or newsletters
- Call transcripts (from tools like Fireflies)
You can also include external writing you admire—for example, a humorous writing guide full of “dad jokes” if that matches your tone. Claude analyzes:
- Vocabulary and phrasing
- Humor and personality
- Storytelling style
- How you explain concepts and sell
It then turns this into a reusable style template you can apply to every blog post.
Research and outline before writing
For a target keyword like “how much does a plumber cost,” you can ask Claude to:
- Research ~20 relevant articles across the web
- Analyze the top 3 Google results for that keyword
- Extract common structures, topics, and patterns that are clearly working
- Use that as the backbone for your own outline
This way, your content isn’t just unique—it’s based on what’s already ranking.
Generate the article directly into WordPress
Once the research and outline are ready, Claude can:
- Write the full article in your trained voice
- Structure it with headings, tables, and FAQs
- Publish it as a WordPress post using your chosen page-building method (covered next)
The result: a blog post that’s both SEO-optimized and genuinely enjoyable to read, which keeps people on the page longer and sends positive engagement signals back to Google.
Step 6: Choose how Claude builds your WordPress pages
Claude can create pages in several ways, each with tradeoffs between design quality and ease of editing for non-technical users.
Option 1: Custom PHP templates
Claude can generate fully custom PHP templates that produce beautiful, highly optimized pages. Pros:
- Best design and layout control
- Fast to iterate with Claude’s help
- Clean, performant code
Cons:
- Non-technical team members or clients can’t easily edit without Claude
- Changes are made via code, not visual editors
Option 2: Gutenberg (block editor)
Claude can also build pages using Gutenberg blocks:
- Every section is editable in the WordPress editor
- Great for teams or clients who want to tweak copy and layout
- Design is usually more basic unless you manually refine it
Option 3: Elementor (visual builder)
With Elementor, Claude can either:
- Build fully editable pages using Elementor widgets only
- Create a hybrid: mostly editable blocks plus code blocks for complex components like styled tables
For the highest design quality and speed, custom PHP is often best. For client-facing sites where non-technical people must edit content, Gutenberg or Elementor may be more practical.
Step 7: Build high-converting service pages at scale
Blog posts build authority, but service pages make the money. A strong local SEO strategy creates a matrix of pages that combine each service with each city you serve.
The “zipper” matrix strategy
Imagine you offer:
- Emergency plumbing
- Water heater repair
- Drain cleaning
And you serve:
- Toronto
- Mississauga
- Vaughan
- Markham
The zipper strategy creates a separate page for each service–city pair:
- Emergency plumber Toronto
- Emergency plumber Mississauga
- Water heater repair Toronto
- Water heater repair Mississauga
- …and so on
You don’t want to spam thousands of thin pages, but a focused set (e.g. 20–200 well-crafted pages) can dramatically increase local visibility.
Let Claude generate service pages from your keyword list
Using your service-keywords.csv and a list of municipalities (e.g. around Toronto), you can instruct Claude to:
- Strip out all “near me” phrases
- Combine each core service with each city
- Create a keyword cluster for each service–city pair
- Generate a high-converting service page template for each one
If you also provide a conversion rate optimization (CRO) blueprint—based on A/B-tested layouts—Claude can bake in proven elements like:
- Clear hero section with headline, subheadline, and call-to-action
- Trust elements (reviews, badges, guarantees)
- Service details and pricing ranges
- FAQ section tailored to local intent
The result is a fleet of service pages that are both SEO-friendly and designed to convert visitors into leads.
Step 8: Optimize on-page, technical, and AI SEO in one pass
Once your pages exist, you want them to be technically solid, on-page optimized, and ready for AI-powered search results like Google’s AI Overviews and LLMs such as ChatGPT, Claude, and Gemini.
On-page SEO: 80+ signals handled automatically
You can create an on-page-seo.md guide listing all the elements you want Claude to optimize, including:
- Meta titles and descriptions
- URL slugs
- Heading structure (H1–H3)
- Internal and external links
- Image alt text and filenames
- Schema markup where relevant
A single prompt can tell Claude to apply this checklist across your new and existing pages, updating content and metadata directly in WordPress.
Technical SEO: use Lighthouse + Claude
For technical performance, use Chrome’s built-in Lighthouse audit:
- Open your page in Chrome
- Go to More Tools → Developer Tools → Lighthouse
- Run a report for performance, accessibility, best practices, and SEO
Expand all the red and orange issues, copy the full report, and paste it into Claude with a prompt like “This is my Lighthouse report. Please fix.” Claude then:
- Optimizes images, scripts, and styles
- Improves Core Web Vitals
- Reduces render-blocking resources
- Implements lazy loading, caching tweaks, and more
You can rerun Lighthouse afterwards and iterate until you’re close to 100 on performance and SEO.
AI SEO: optimize for AI Overviews and LLMs
To increase your chances of being featured in AI Overviews and LLM answers, Claude can:
- Place a direct, concise answer to the main question at the top of the page
- Use tables, lists, and bullet points that are easy for AI to extract
- Add FAQ sections with questions that match real user queries
- Add an author block with name, credentials, and updated date
- Create an
llms.txtfile that helps LLMs understand how to use your content
Because AI systems often pull from the top 10 Google results, this AI SEO layer works best once your traditional SEO is already strong.
Step 9: Refresh and upgrade existing content
You don’t have to start from scratch. Claude can also take older, underperforming posts and turn them into modern, optimized assets.
The process is simple:
- Point Claude to an existing URL or post
- Ask it to rewrite the page using your writing style, current SEO best practices, and your on-page/technical/AI SEO guides
- Have it update the WordPress post in place
Outdated, thin content becomes fresh, comprehensive, and aligned with your new keyword strategy and voice.
Step 10: Turn everything into reusable Claude Code skills
Up to this point, you’ve been running multiple prompts and steps. Claude Code lets you bundle entire workflows into reusable skills—on-demand automations you trigger with a single command.
For example, you can create skills for:
- Blog creation: from keyword cluster → research → outline → draft → WordPress post → on-page + technical + AI SEO
- Service page creation: from service–city pair → keyword cluster → CRO layout → WordPress page → full optimization
These skills live in a .claude/skills folder in your project. Once defined, you can open a new Claude Code tab and simply type something like /blog or /service, then provide the target keyword or service–city combo. Claude runs the entire chain automatically.
If you’re interested in broader automation ideas (beyond SEO), you might also find this guide on automating social media with Claude Code helpful.
Step 11: Off-page SEO and backlinks (with caution)
Backlinks—links from other sites to yours—still matter for SEO, but they’re also where many businesses get burned by low-quality tactics.
Common backlink strategies include:
- Guest posting: writing articles for other sites in your niche in exchange for a link
- Paid links: paying for placement on high-authority sites (risky and against Google’s guidelines)
- HARO-style outreach: answering journalists’ questions in exchange for a citation link
- Broken link building: finding broken links on other sites and suggesting your content as a replacement
Claude can help automate research and outreach templates, but the key warning is this: bad backlinks can work for a while, then get wiped out—or even penalized—by a future Google update. Many sites see their traffic fall off a cliff after relying heavily on cheap backlink packages.
For most businesses, it’s safer to focus primarily on:
- High-quality content and on-page/technical excellence
- Legitimate mentions and partnerships
- Natural links earned over time
Step 12: Get your pages indexed with Google Search Console
None of this matters if Google never discovers your pages. Indexing is the process of getting your URLs into Google’s searchable database.
Set up Google Search Console
To connect your site:
- Go to Google Search Console and click Start now
- Add a property using either Domain or URL prefix (URL prefix is often simpler for WordPress)
- Copy the HTML meta tag provided by Google
- Ask Claude (via your WordPress connection) to insert that tag into your site’s
<head> - Clear your site cache, then click Verify in Search Console
Submit your sitemap
Once verified:
- Go to Sitemaps in Search Console
- Enter your sitemap URL (e.g.
https://yourdomain.com/sitemap_index.xmlfrom Yoast) - Submit it so Google can discover all your important pages
Request indexing for specific URLs
Sometimes important pages remain unindexed even with a sitemap. To nudge Google:
- Paste the URL into the top search bar in Search Console
- Click Request indexing
Do this for new or especially important pages (like key service pages) to speed up their appearance in search results.
Bringing it all together
With Claude Code, SEMrush, and a handful of WordPress tools, you can turn WordPress SEO from a never-ending manual project into a mostly automated system:
- SEMrush finds issues and opportunities
- Claude Code fixes technical and on-page problems
- Plugins are installed and configured automatically
- Blog posts and service pages are generated in your voice
- AI SEO ensures you’re ready for AI Overviews and LLMs
- Skills let you spin up new content and pages with a single command
Instead of spending months tweaking settings and writing from scratch, you spend your time on strategy: choosing the right keywords, defining your offers, and letting automation handle the rest.
Comments
No comments yet. Be the first to share your thoughts!