Skip to content
All guides
Development Claude Cursor Vibe coding

Best AI for WordPress Development: Claude, Cursor and Copilot

Which AI is best for WordPress development and building WordPress plugins? A practical comparison plus a workflow, rules file and security checklist.

Written by WordPress, SEO and AI search specialist

2 min read

AI coding assistants now write a large share of new WordPress code. Here’s how to get good results, and avoid shipping an insecure plugin.

The main options

ToolBest for
Claude (Claude Code, claude.ai)Larger tasks: whole plugins, refactors, reasoning about a big codebase, writing tests. Strong on WordPress coding standards and security when you ask for them.
CursorAn AI-first editor. Good for iterating inside a theme or plugin repo with full project context.
GitHub CopilotInline autocomplete and chat inside VS Code and JetBrains. Low friction for day-to-day work.
ChatGPT / GeminiQuick snippets, explanations and debugging help.

All of them work well with WordPress because there is so much public WordPress code to learn from. They also learned plenty of old, insecure WordPress code, which is the main risk.

A workflow that works

  1. Start with a spec. Describe the plugin’s purpose, admin screens, data model, hooks and capabilities before asking for code.
  2. Give it a rules file. Cursor rules, a CLAUDE.md or a Copilot instructions file with your standards (see below).
  3. Generate in small steps. Scaffold first, then add one feature at a time and test after each.
  4. Connect live context. Use an MCP server or WP-CLI so the assistant can inspect a local or staging site.
  5. Review like it’s a junior’s PR. You are still responsible for what ships.

Starter rules for WordPress projects

- Follow WordPress Coding Standards (PHPCS WordPress ruleset).
- Prefix all functions, classes, options and hooks with the plugin slug.
- Sanitize all input (sanitize_text_field, absint, etc.) and escape all output (esc_html, esc_attr, esc_url, wp_kses_post).
- Verify nonces and check current_user_can() on every form handler, AJAX and REST endpoint.
- Use $wpdb->prepare() for every query with variables.
- Make all user-facing strings translatable with the plugin text domain.
- Target the current WordPress and PHP versions in the plugin header.
- Prefer core APIs (Settings API, REST API, Abilities API, AI Client) over custom implementations.

Security checklist for AI-written plugins

Many vulnerabilities in our directory’s security data are the classic ones: missing capability checks, missing nonces, unescaped output and SQL injection. Before you ship:

  • Run PHPCS with the WordPress ruleset and the Plugin Check plugin.
  • Grep for every $_GET, $_POST and $_REQUEST and confirm each one is sanitized and capability-checked.
  • Confirm every REST route has a real permission_callback (never __return_true for write actions).
  • Ask a second AI session to review the code only for security issues.

Building an AI-powered plugin?

Build on WordPress 7’s AI Client rather than calling provider APIs directly. Your users connect a provider once, and your plugin works with Claude, GPT or Gemini. See WordPress 7.0 AI.