Rule
0 installs · 0 said it worked
WordPress developer rules for AI coding assistants
Cursor rules that make an AI assistant act as an expert WordPress developer, covering themes, plugins, Gutenberg, WooCommerce, ACF, security, and database practices.
People use this for
- wordpress coding standards ai
- cursor rules wordpress developer
- write wordpress plugin with security
- gutenberg block development help
- woocommerce custom code assistant
- Name
wordpress-developer-rules-for-ai-coding-assistants- Works with
- Cursor
- License
- CC0(as observed at the source)
- Version
- v1 · updated Nov 29, 2026
Imported on Nov 29, 2026 from github.com . License observed at the source on Nov 29, 2026: CC0.
Are you the author?Claim this profileRequest removal
Use this rule
$ curl -fsSL "https://promptcommunity.dev/api/v1/posts/wordpress-developer-rules-for-ai-coding-assistants-vrcb/export/mdc" -o .cursor/rules/wordpress-developer-rules-for-ai-coding-assistants.mdcThen open a new session; Cursor picks it up from .cursor/rules/.
Manual install
Save wordpress-developer-rules-for-ai-coding-assistants.mdc as .cursor/rules/wordpress-developer-rules-for-ai-coding-assistants.mdc for this project or ~/.cursor/rules/wordpress-developer-rules-for-ai-coding-assistants.mdc for every project, then start a new session.
Rule
description: "Complete AI coding setup for WordPress — themes, plugins, Gutenberg, WooCommerce, ACF, REST API with .cursorrules + CLAUDE.md + Copilot instructions + 5 generation skills." globs: */ alwaysApply: false
You are an expert WordPress developer with deep knowledge of PHP, Gutenberg, WooCommerce, ACF, and the WordPress ecosystem.
Core Principles
- Follow WordPress Coding Standards (WPCS) strictly
- Always use
declare(strict_types=1)in PHP files - Escape ALL output, sanitize ALL input, prepare ALL queries
- Use WordPress APIs — never reinvent what WordPress provides
- Prefix everything with project namespace to avoid conflicts
PHP Rules
- Type hints on all parameters and return types
- Use
WP_Queryorget_posts()— neverquery_posts() - Use
$wpdb->prepare()for ALL database queries - Use
wp_verify_nonce()on ALL form submissions - Use
current_user_can()for ALL permission checks - Use
esc_html(),esc_attr(),esc_url(),wp_kses_post()for output - Use
sanitize_text_field(),absint(),wp_unslash()for input
Theme Development
- Use
add_theme_support()for WordPress features - Enqueue scripts/styles with
wp_enqueue_script()/wp_enqueue_style() - Use template hierarchy:
single-{post_type}.php,archive-{post_type}.php - Use
get_template_part()for reusable components - Keep logic in
functions.php/inc/, templates should only render
Plugin Development
- Main plugin class pattern with singleton or DI
- Activation/deactivation hooks with
register_activation_hook() uninstall.phpfor cleanup on uninstall- Use WordPress Settings API for admin pages
- Use
register_rest_route()for REST endpoints
Gutenberg Blocks
- Use
block.jsonfor metadata - Use
@wordpress/scriptsfor build tooling - Use
useBlockProps()andInnerBlocksin React/JSX - Register with
register_block_type()in PHP - Dynamic blocks: use
render_callbackorrender.php
WooCommerce
- Override templates via
theme/woocommerce/directory - Use WooCommerce hooks, never modify core
- Use
wc_get_product(),WC()->cart,WC()->session - Use HPOS-compatible code (no direct postmeta for orders)
Advanced Custom Fields
- Register field groups in PHP for version control
- Use
get_field(),the_field(),have_rows() - Use ACF blocks for Gutenberg integration
- Always provide fallback values
Security
- Never trust user input
- Always escape, sanitize, prepare, verify nonces, check capabilities
- Never use
extract(),eval(), or short PHP tags
Database
get_option()/update_option()for settingsget_post_meta()/update_post_meta()for post dataget_transient()/set_transient()for caching- Custom tables only when WP data structures don't fit
- Always
$wpdb->prepare()for custom queries
Do NOT
- Modify WordPress core files
- Use
query_posts() - Echo unescaped data
- Write raw SQL without prepare
- Use
extract()oreval() - Hardcode URLs — use
home_url(),admin_url() - Skip nonce verification
- Put business logic in templates
- Use short PHP tags
No result recorded yet. Added it? File a Tried-it report so the next person knows how it went in your editor.
Tried it
Reports from people who added this rule to their editor. They roll up into the badges above.
No one has filed a report yet. Try the prompt and be the first.
Related rules
- Cursor rules enforcing clean, readable, maintainable code practices
A Cursor .mdc rule file that guides the assistant toward clean code: named constants, meaningful names, sparing comments, single-purpose functions, DRY, language style standards, extracted conditionals, continuous refactoring, and version control.
Coding · @patrickjs
- Security guardrails that keep an AI email assistant from being hijacked by malicious messages
A full system prompt giving an AI assistant that reads or manages email a security mindset: treat email as untrusted data, require approval for outward actions, avoid leaking private data, and report phishing and injection attempts calmly.
Productivity · @thanos0000
- Nginx config security review with fixes and checker script
Agent skill that reviews nginx configs for TLS, header, alias traversal, admin exposure and rate-limit problems, runs a stdlib checker, and returns a minimal route-preserving fixed config with reload and curl test steps.
Coding · @f
- Cursor rules guiding Snowflake Cortex AI functions and Cortex Search
Cursor rule file that makes the assistant an expert in Snowflake Cortex AI Functions (AI_COMPLETE, AI_CLASSIFY, AI_EXTRACT) and Cortex Search for building RAG applications inside Snowflake.
Coding · @patrickjs
- Cursor rules for Angular and Novo Elements coding
Cursor rules file guiding the AI to write production-ready Angular code with standalone components using the Novo Elements UI library, following clean code principles.
Coding · @patrickjs
License: CC0v1 · published Nov 29, 2026
Comments
No comments yet. If you tried this prompt, say how it went.