claude-plugin-wordpress-manager 1.5.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/.claude-plugin/plugin.json +2 -2
  2. package/CHANGELOG.md +97 -0
  3. package/README.md +27 -13
  4. package/agents/wp-accessibility-auditor.md +206 -0
  5. package/agents/wp-content-strategist.md +18 -0
  6. package/agents/wp-deployment-engineer.md +34 -2
  7. package/agents/wp-performance-optimizer.md +12 -0
  8. package/agents/wp-security-auditor.md +20 -0
  9. package/agents/wp-security-hardener.md +266 -0
  10. package/agents/wp-site-manager.md +14 -0
  11. package/agents/wp-test-engineer.md +207 -0
  12. package/docs/guides/INDEX.md +46 -0
  13. package/docs/guides/wp-blog.md +590 -0
  14. package/docs/guides/wp-design-system.md +976 -0
  15. package/docs/guides/wp-ecommerce.md +786 -0
  16. package/docs/guides/wp-landing-page.md +762 -0
  17. package/docs/guides/wp-portfolio.md +713 -0
  18. package/docs/plans/2026-02-27-design-system-guide-design.md +30 -0
  19. package/docs/plans/2026-02-27-site-type-guides-design.md +44 -0
  20. package/package.json +2 -2
  21. package/skills/wordpress-router/references/decision-tree.md +12 -2
  22. package/skills/wp-accessibility/SKILL.md +170 -0
  23. package/skills/wp-accessibility/references/a11y-audit-tools.md +248 -0
  24. package/skills/wp-accessibility/references/a11y-testing.md +222 -0
  25. package/skills/wp-accessibility/references/block-a11y.md +247 -0
  26. package/skills/wp-accessibility/references/interactive-a11y.md +272 -0
  27. package/skills/wp-accessibility/references/media-a11y.md +254 -0
  28. package/skills/wp-accessibility/references/theme-a11y.md +309 -0
  29. package/skills/wp-audit/SKILL.md +4 -0
  30. package/skills/wp-block-development/SKILL.md +5 -0
  31. package/skills/wp-block-themes/SKILL.md +4 -0
  32. package/skills/wp-e2e-testing/SKILL.md +186 -0
  33. package/skills/wp-e2e-testing/references/ci-integration.md +174 -0
  34. package/skills/wp-e2e-testing/references/jest-wordpress.md +114 -0
  35. package/skills/wp-e2e-testing/references/phpunit-wordpress.md +141 -0
  36. package/skills/wp-e2e-testing/references/playwright-wordpress.md +108 -0
  37. package/skills/wp-e2e-testing/references/test-data-generation.md +127 -0
  38. package/skills/wp-e2e-testing/references/visual-regression.md +107 -0
  39. package/skills/wp-e2e-testing/references/wp-env-setup.md +97 -0
  40. package/skills/wp-e2e-testing/scripts/test_inspect.mjs +375 -0
  41. package/skills/wp-headless/SKILL.md +168 -0
  42. package/skills/wp-headless/references/api-layer-choice.md +160 -0
  43. package/skills/wp-headless/references/cors-config.md +245 -0
  44. package/skills/wp-headless/references/frontend-integration.md +331 -0
  45. package/skills/wp-headless/references/headless-auth.md +286 -0
  46. package/skills/wp-headless/references/webhooks.md +277 -0
  47. package/skills/wp-headless/references/wpgraphql.md +331 -0
  48. package/skills/wp-headless/scripts/headless_inspect.mjs +321 -0
  49. package/skills/wp-i18n/SKILL.md +170 -0
  50. package/skills/wp-i18n/references/js-i18n.md +201 -0
  51. package/skills/wp-i18n/references/multilingual-setup.md +219 -0
  52. package/skills/wp-i18n/references/php-i18n.md +196 -0
  53. package/skills/wp-i18n/references/rtl-support.md +206 -0
  54. package/skills/wp-i18n/references/translation-workflow.md +178 -0
  55. package/skills/wp-i18n/references/wpcli-i18n.md +177 -0
  56. package/skills/wp-i18n/scripts/i18n_inspect.mjs +330 -0
  57. package/skills/wp-interactivity-api/SKILL.md +4 -0
  58. package/skills/wp-plugin-development/SKILL.md +6 -0
  59. package/skills/wp-rest-api/SKILL.md +4 -0
  60. package/skills/wp-security/SKILL.md +179 -0
  61. package/skills/wp-security/references/api-restriction.md +147 -0
  62. package/skills/wp-security/references/authentication-hardening.md +105 -0
  63. package/skills/wp-security/references/filesystem-hardening.md +105 -0
  64. package/skills/wp-security/references/http-headers.md +105 -0
  65. package/skills/wp-security/references/incident-response.md +144 -0
  66. package/skills/wp-security/references/user-capabilities.md +115 -0
  67. package/skills/wp-security/references/wp-config-security.md +129 -0
  68. package/skills/wp-security/scripts/security_inspect.mjs +393 -0
@@ -0,0 +1,144 @@
1
+ # Incident Response
2
+
3
+ Use this file when responding to a suspected or confirmed WordPress site compromise.
4
+
5
+ ## Signs of compromise
6
+
7
+ - Unknown admin user accounts appeared
8
+ - Core files modified (checksums don't match)
9
+ - Suspicious cron jobs in `wp_options` → `cron` entry
10
+ - SEO spam injected into posts or pages
11
+ - Visitors redirected to malicious sites
12
+ - Google Search Console security warnings
13
+ - Hosting provider notifications about malware
14
+ - Unexpected file changes (new `.php` files in uploads, modified theme files)
15
+ - Unexplained outgoing network traffic
16
+ - Database entries with encoded/obfuscated content
17
+
18
+ ## Phase 1: Containment (immediate)
19
+
20
+ 1. **Change all passwords** — WordPress admin, database, FTP/SSH, hosting panel:
21
+ ```bash
22
+ wp user update admin --user_pass=NEW_STRONG_PASSWORD
23
+ ```
24
+
25
+ 2. **Revoke all sessions** — force all users to re-authenticate:
26
+ ```bash
27
+ wp user session destroy --all
28
+ ```
29
+
30
+ 3. **Regenerate security keys** — invalidates all existing cookies:
31
+ ```bash
32
+ wp config shuffle-salts
33
+ ```
34
+
35
+ 4. **Enable maintenance mode** (if the site is actively harmful):
36
+ ```bash
37
+ wp maintenance-mode activate
38
+ ```
39
+
40
+ 5. **Revoke application passwords**:
41
+ ```bash
42
+ wp user application-password delete admin --all
43
+ ```
44
+
45
+ ## Phase 2: Investigation
46
+
47
+ 1. **Verify core file integrity**:
48
+ ```bash
49
+ wp core verify-checksums
50
+ ```
51
+
52
+ 2. **Find recently modified files**:
53
+ ```bash
54
+ find /var/www/html -type f -mtime -7 -name "*.php" -ls
55
+ ```
56
+
57
+ 3. **Search for common malware signatures**:
58
+ ```bash
59
+ grep -rl "eval(base64_decode" /var/www/html/
60
+ grep -rl "eval(gzinflate" /var/www/html/
61
+ grep -rl "preg_replace.*e'" /var/www/html/
62
+ grep -rl "assert(" /var/www/html/wp-content/
63
+ ```
64
+
65
+ 4. **Check cron jobs for suspicious entries**:
66
+ ```bash
67
+ wp cron event list
68
+ ```
69
+
70
+ 5. **Review access logs** for the attack timeline:
71
+ ```bash
72
+ grep "POST" /var/log/apache2/access.log | grep -E "(wp-login|xmlrpc|admin-ajax)" | tail -100
73
+ ```
74
+
75
+ 6. **Check for unknown admin users**:
76
+ ```bash
77
+ wp user list --role=administrator --fields=ID,user_login,user_email,user_registered
78
+ ```
79
+
80
+ ## Phase 3: Remediation
81
+
82
+ 1. **Remove malicious code** identified in investigation:
83
+ ```bash
84
+ # Delete unknown files in uploads
85
+ find /var/www/html/wp-content/uploads -name "*.php" -delete
86
+ ```
87
+
88
+ 2. **Reinstall WordPress core**:
89
+ ```bash
90
+ wp core download --force --skip-content
91
+ ```
92
+
93
+ 3. **Update all plugins and themes**:
94
+ ```bash
95
+ wp plugin update --all
96
+ wp theme update --all
97
+ ```
98
+
99
+ 4. **Remove inactive plugins and themes**:
100
+ ```bash
101
+ wp plugin delete $(wp plugin list --status=inactive --field=name)
102
+ wp theme delete $(wp theme list --status=inactive --field=name)
103
+ ```
104
+
105
+ 5. **Review database** for injected content:
106
+ ```bash
107
+ wp db search "<script" --regex
108
+ wp db search "eval(" --regex
109
+ ```
110
+
111
+ 6. **Check `.htaccess`** for malicious redirects — compare against WordPress default.
112
+
113
+ ## Phase 4: Recovery
114
+
115
+ If a clean backup exists and is more reliable than manual cleanup:
116
+
117
+ ```bash
118
+ # Restore from backup
119
+ wp db import clean-backup.sql
120
+ # Then re-apply only the security hardening steps
121
+ ```
122
+
123
+ Post-recovery hardening:
124
+ 1. Apply all steps from `filesystem-hardening.md`
125
+ 2. Apply all steps from `wp-config-security.md`
126
+ 3. Install a security monitoring plugin (Wordfence, Sucuri)
127
+ 4. Set up file integrity monitoring
128
+
129
+ ## Phase 5: Post-incident
130
+
131
+ 1. **Document the timeline** — when the breach occurred, when detected, actions taken
132
+ 2. **Identify the attack vector** — vulnerable plugin, weak password, unpatched core
133
+ 3. **Update security procedures** — add the missing controls that allowed the breach
134
+ 4. **Notify affected users** if personal data was exposed (GDPR, state laws may require this)
135
+ 5. **Request Google review** if the site was flagged in Search Console
136
+ 6. **Monitor** for re-infection over the following 30 days
137
+
138
+ ## When to engage professionals
139
+
140
+ - Malware persists after cleanup (re-infection)
141
+ - Database contains encrypted/obfuscated payloads you can't decode
142
+ - Hosting provider requires professional remediation report
143
+ - Legal obligations require forensic analysis
144
+ - Site handles payments or sensitive personal data
@@ -0,0 +1,115 @@
1
+ # User Capabilities Audit
2
+
3
+ Use this file when auditing and managing WordPress user accounts, roles, and capabilities.
4
+
5
+ ## Default WordPress roles
6
+
7
+ | Role | Key capabilities |
8
+ |------|-----------------|
9
+ | Super Admin | Multisite: all capabilities across all sites |
10
+ | Administrator | `manage_options`, `install_plugins`, `edit_users`, `delete_users` |
11
+ | Editor | `publish_pages`, `edit_others_posts`, `manage_categories` |
12
+ | Author | `publish_posts`, `edit_published_posts`, `upload_files` |
13
+ | Contributor | `edit_posts` (cannot publish), `read` |
14
+ | Subscriber | `read` only |
15
+
16
+ ## Audit administrator accounts
17
+
18
+ Best practice: 1-2 administrator accounts maximum.
19
+
20
+ ```bash
21
+ # List all administrators
22
+ wp user list --role=administrator --fields=ID,user_login,user_email,user_registered
23
+
24
+ # Count administrators
25
+ wp user list --role=administrator --format=count
26
+ ```
27
+
28
+ Flags for review:
29
+ - More than 2 administrators
30
+ - Generic usernames: `admin`, `administrator`, `test`, `user`
31
+ - Email addresses from external domains
32
+ - Accounts not used in 90+ days
33
+
34
+ ## Find dormant accounts
35
+
36
+ ```bash
37
+ # List users who haven't logged in recently (requires user meta tracking)
38
+ wp user list --fields=ID,user_login,user_registered --format=table
39
+
40
+ # List all users by role
41
+ wp user list --role=subscriber --format=count
42
+ wp user list --role=contributor --format=count
43
+ ```
44
+
45
+ Remove or downgrade dormant accounts:
46
+ ```bash
47
+ # Downgrade to subscriber
48
+ wp user set-role <user_id> subscriber
49
+
50
+ # Delete user (reassign content to admin)
51
+ wp user delete <user_id> --reassign=1
52
+ ```
53
+
54
+ ## Custom roles
55
+
56
+ ```php
57
+ // Add a custom role
58
+ add_role('shop_manager', 'Shop Manager', [
59
+ 'read' => true,
60
+ 'edit_posts' => true,
61
+ 'publish_posts' => true,
62
+ 'manage_woocommerce' => true,
63
+ ]);
64
+
65
+ // Remove a role
66
+ remove_role('shop_manager');
67
+ ```
68
+
69
+ ## Custom capabilities
70
+
71
+ ```php
72
+ // Grant a capability to a role
73
+ $role = get_role('editor');
74
+ $role->add_cap('manage_custom_settings');
75
+
76
+ // Remove a capability
77
+ $role->remove_cap('manage_custom_settings');
78
+
79
+ // Grant to a specific user
80
+ $user = get_userdata($user_id);
81
+ $user->add_cap('view_reports');
82
+ ```
83
+
84
+ ## WP-CLI capability management
85
+
86
+ ```bash
87
+ # List all capabilities for a role
88
+ wp cap list administrator
89
+
90
+ # Add capability to role
91
+ wp cap add editor manage_custom_settings
92
+
93
+ # Remove capability from role
94
+ wp cap remove editor manage_custom_settings
95
+ ```
96
+
97
+ ## Principle of least privilege
98
+
99
+ Guidelines:
100
+ 1. **Content creators** → Author role (can only edit/publish their own posts)
101
+ 2. **Content managers** → Editor role (can edit all content, no admin access)
102
+ 3. **Plugin managers** → Custom role with `install_plugins` but not `edit_users`
103
+ 4. **SEO managers** → Custom role with specific plugin capabilities
104
+ 5. **Developers** → Administrator only on staging/development; use deploy pipelines for production
105
+
106
+ Never give administrator access for tasks that can be accomplished with a lower role.
107
+
108
+ ## Audit checklist
109
+
110
+ - [ ] Administrator count is 1-2
111
+ - [ ] No accounts with username "admin"
112
+ - [ ] All admin email addresses are verified and current
113
+ - [ ] No dormant accounts (inactive > 90 days) with elevated roles
114
+ - [ ] Custom roles follow principle of least privilege
115
+ - [ ] No unnecessary `unfiltered_html` capability (multisite: `DISALLOW_UNFILTERED_HTML`)
@@ -0,0 +1,129 @@
1
+ # wp-config.php Security Constants
2
+
3
+ Use this file when securing WordPress configuration via `wp-config.php` constants.
4
+
5
+ ## Security keys and salts
6
+
7
+ WordPress uses 8 security keys for cookie signing and nonce generation. Regenerate them if compromised:
8
+
9
+ ```php
10
+ // Generate fresh keys at: https://api.wordpress.org/secret-key/1.1/salt/
11
+ define('AUTH_KEY', 'unique-random-string');
12
+ define('SECURE_AUTH_KEY', 'unique-random-string');
13
+ define('LOGGED_IN_KEY', 'unique-random-string');
14
+ define('NONCE_KEY', 'unique-random-string');
15
+ define('AUTH_SALT', 'unique-random-string');
16
+ define('SECURE_AUTH_SALT', 'unique-random-string');
17
+ define('LOGGED_IN_SALT', 'unique-random-string');
18
+ define('NONCE_SALT', 'unique-random-string');
19
+ ```
20
+
21
+ **Check for defaults**: if any key contains `put your unique phrase here`, it must be replaced immediately.
22
+
23
+ Via WP-CLI:
24
+ ```bash
25
+ wp config shuffle-salts
26
+ ```
27
+
28
+ ## Database table prefix
29
+
30
+ Default `wp_` prefix is widely known. Change for new installations:
31
+
32
+ ```php
33
+ $table_prefix = 'wp8x_'; // Custom prefix
34
+ ```
35
+
36
+ **Warning**: changing the prefix on an existing site requires renaming all database tables and updating `usermeta` and `options` entries.
37
+
38
+ ## Debug settings
39
+
40
+ Production:
41
+ ```php
42
+ define('WP_DEBUG', false);
43
+ define('WP_DEBUG_LOG', false);
44
+ define('WP_DEBUG_DISPLAY', false);
45
+ ```
46
+
47
+ Development only:
48
+ ```php
49
+ define('WP_DEBUG', true);
50
+ define('WP_DEBUG_LOG', true); // Logs to wp-content/debug.log
51
+ define('WP_DEBUG_DISPLAY', false); // Don't show errors to visitors
52
+ define('SCRIPT_DEBUG', true); // Use unminified core scripts
53
+ ```
54
+
55
+ **Risk**: `WP_DEBUG_DISPLAY true` in production exposes file paths and error details to attackers.
56
+
57
+ ## Force SSL for admin
58
+
59
+ ```php
60
+ define('FORCE_SSL_ADMIN', true);
61
+ ```
62
+
63
+ Ensures all admin and login pages use HTTPS.
64
+
65
+ ## Auto-update configuration
66
+
67
+ ```php
68
+ // Enable automatic updates for minor releases (security patches)
69
+ define('WP_AUTO_UPDATE_CORE', 'minor');
70
+
71
+ // Or enable all automatic updates
72
+ define('WP_AUTO_UPDATE_CORE', true);
73
+
74
+ // Disable all automatic updates (manage manually)
75
+ define('WP_AUTO_UPDATE_CORE', false);
76
+ ```
77
+
78
+ Recommended: at least `'minor'` for security patches.
79
+
80
+ ## File modification controls
81
+
82
+ ```php
83
+ // Disable theme/plugin editor in admin
84
+ define('DISALLOW_FILE_EDIT', true);
85
+
86
+ // Disable all file modifications (blocks installs, updates, editor)
87
+ define('DISALLOW_FILE_MODS', true);
88
+ ```
89
+
90
+ ## Move wp-config above web root
91
+
92
+ If your hosting allows it, move `wp-config.php` one directory above the web root:
93
+
94
+ ```
95
+ /home/user/wp-config.php ← Here (not web-accessible)
96
+ /home/user/public_html/ ← Web root
97
+ /home/user/public_html/wp-admin/
98
+ /home/user/public_html/wp-content/
99
+ ```
100
+
101
+ WordPress automatically checks the parent directory for `wp-config.php`.
102
+
103
+ ## Multisite security
104
+
105
+ ```php
106
+ // Prevent administrators from using unfiltered HTML (important for multisite)
107
+ define('DISALLOW_UNFILTERED_HTML', true);
108
+ ```
109
+
110
+ ## Database credentials
111
+
112
+ Ensure database credentials in `wp-config.php` use a dedicated WordPress user with only the required privileges:
113
+
114
+ ```sql
115
+ GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER
116
+ ON wordpress_db.* TO 'wp_user'@'localhost' IDENTIFIED BY 'strong_password';
117
+ ```
118
+
119
+ Never use the `root` MySQL user for WordPress.
120
+
121
+ ## Verification
122
+
123
+ ```bash
124
+ # Check key constants via WP-CLI
125
+ wp config get WP_DEBUG
126
+ wp config get DISALLOW_FILE_EDIT
127
+ wp config get FORCE_SSL_ADMIN
128
+ wp config get table_prefix
129
+ ```