claude-plugin-wordpress-manager 1.4.0
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.
- package/.claude-plugin/plugin.json +19 -0
- package/.mcp.json +19 -0
- package/CHANGELOG.md +62 -0
- package/LICENSE +69 -0
- package/README.md +213 -0
- package/agents/wp-content-strategist.md +148 -0
- package/agents/wp-deployment-engineer.md +93 -0
- package/agents/wp-performance-optimizer.md +198 -0
- package/agents/wp-security-auditor.md +161 -0
- package/agents/wp-site-manager.md +109 -0
- package/commands/wp-audit.md +37 -0
- package/commands/wp-backup.md +45 -0
- package/commands/wp-deploy.md +38 -0
- package/commands/wp-setup.md +64 -0
- package/commands/wp-status.md +53 -0
- package/docs/GUIDE.md +1190 -0
- package/hooks/hooks.json +57 -0
- package/hooks/scripts/backup-reminder.sh +29 -0
- package/hooks/scripts/pre-deploy-check.sh +49 -0
- package/package.json +46 -0
- package/scripts/health-check.sh +110 -0
- package/scripts/validate-wp-operation.sh +115 -0
- package/servers/wp-rest-bridge/build/server.d.ts +2 -0
- package/servers/wp-rest-bridge/build/server.js +74 -0
- package/servers/wp-rest-bridge/build/tools/comments.d.ts +227 -0
- package/servers/wp-rest-bridge/build/tools/comments.js +192 -0
- package/servers/wp-rest-bridge/build/tools/index.d.ts +919 -0
- package/servers/wp-rest-bridge/build/tools/index.js +30 -0
- package/servers/wp-rest-bridge/build/tools/media.d.ts +174 -0
- package/servers/wp-rest-bridge/build/tools/media.js +247 -0
- package/servers/wp-rest-bridge/build/tools/plugin-repository.d.ts +62 -0
- package/servers/wp-rest-bridge/build/tools/plugin-repository.js +149 -0
- package/servers/wp-rest-bridge/build/tools/plugins.d.ts +153 -0
- package/servers/wp-rest-bridge/build/tools/plugins.js +175 -0
- package/servers/wp-rest-bridge/build/tools/search.d.ts +44 -0
- package/servers/wp-rest-bridge/build/tools/search.js +44 -0
- package/servers/wp-rest-bridge/build/tools/unified-content.d.ts +328 -0
- package/servers/wp-rest-bridge/build/tools/unified-content.js +628 -0
- package/servers/wp-rest-bridge/build/tools/unified-taxonomies.d.ts +244 -0
- package/servers/wp-rest-bridge/build/tools/unified-taxonomies.js +492 -0
- package/servers/wp-rest-bridge/build/tools/users.d.ts +269 -0
- package/servers/wp-rest-bridge/build/tools/users.js +226 -0
- package/servers/wp-rest-bridge/build/types.d.ts +151 -0
- package/servers/wp-rest-bridge/build/types.js +2 -0
- package/servers/wp-rest-bridge/build/wordpress.d.ts +48 -0
- package/servers/wp-rest-bridge/build/wordpress.js +305 -0
- package/servers/wp-rest-bridge/package.json +27 -0
- package/skills/wordpress-router/SKILL.md +78 -0
- package/skills/wordpress-router/references/decision-tree.md +88 -0
- package/skills/wp-abilities-api/SKILL.md +97 -0
- package/skills/wp-abilities-api/references/php-registration.md +67 -0
- package/skills/wp-abilities-api/references/rest-api.md +13 -0
- package/skills/wp-audit/SKILL.md +114 -0
- package/skills/wp-audit/references/performance-checklist.md +113 -0
- package/skills/wp-audit/references/security-checklist.md +95 -0
- package/skills/wp-audit/references/seo-checklist.md +128 -0
- package/skills/wp-backup/SKILL.md +87 -0
- package/skills/wp-backup/references/backup-strategies.md +116 -0
- package/skills/wp-backup/references/restore-procedures.md +129 -0
- package/skills/wp-block-development/SKILL.md +176 -0
- package/skills/wp-block-development/references/attributes-and-serialization.md +22 -0
- package/skills/wp-block-development/references/block-json.md +49 -0
- package/skills/wp-block-development/references/creating-new-blocks.md +46 -0
- package/skills/wp-block-development/references/debugging.md +36 -0
- package/skills/wp-block-development/references/deprecations.md +24 -0
- package/skills/wp-block-development/references/dynamic-rendering.md +23 -0
- package/skills/wp-block-development/references/inner-blocks.md +25 -0
- package/skills/wp-block-development/references/registration.md +30 -0
- package/skills/wp-block-development/references/supports-and-wrappers.md +18 -0
- package/skills/wp-block-development/references/tooling-and-testing.md +21 -0
- package/skills/wp-block-development/scripts/list_blocks.mjs +121 -0
- package/skills/wp-block-themes/SKILL.md +118 -0
- package/skills/wp-block-themes/references/creating-new-block-theme.md +37 -0
- package/skills/wp-block-themes/references/debugging.md +24 -0
- package/skills/wp-block-themes/references/patterns.md +18 -0
- package/skills/wp-block-themes/references/style-variations.md +14 -0
- package/skills/wp-block-themes/references/templates-and-parts.md +16 -0
- package/skills/wp-block-themes/references/theme-json.md +59 -0
- package/skills/wp-block-themes/scripts/detect_block_themes.mjs +117 -0
- package/skills/wp-content/SKILL.md +103 -0
- package/skills/wp-content/references/content-templates.md +230 -0
- package/skills/wp-content/references/seo-optimization.md +169 -0
- package/skills/wp-deploy/SKILL.md +52 -0
- package/skills/wp-deploy/references/hostinger-deploy.md +51 -0
- package/skills/wp-deploy/references/ssh-deploy.md +63 -0
- package/skills/wp-interactivity-api/SKILL.md +181 -0
- package/skills/wp-interactivity-api/references/debugging.md +29 -0
- package/skills/wp-interactivity-api/references/directives-quickref.md +30 -0
- package/skills/wp-interactivity-api/references/server-side-rendering.md +310 -0
- package/skills/wp-migrate/SKILL.md +100 -0
- package/skills/wp-migrate/references/cross-platform.md +104 -0
- package/skills/wp-migrate/references/hostinger-migration.md +86 -0
- package/skills/wp-performance/SKILL.md +148 -0
- package/skills/wp-performance/references/autoload-options.md +24 -0
- package/skills/wp-performance/references/cron.md +20 -0
- package/skills/wp-performance/references/database.md +20 -0
- package/skills/wp-performance/references/http-api.md +15 -0
- package/skills/wp-performance/references/measurement.md +21 -0
- package/skills/wp-performance/references/object-cache.md +24 -0
- package/skills/wp-performance/references/query-monitor-headless.md +38 -0
- package/skills/wp-performance/references/server-timing.md +22 -0
- package/skills/wp-performance/references/wp-cli-doctor.md +24 -0
- package/skills/wp-performance/references/wp-cli-profile.md +32 -0
- package/skills/wp-performance/scripts/perf_inspect.mjs +128 -0
- package/skills/wp-phpstan/SKILL.md +99 -0
- package/skills/wp-phpstan/references/configuration.md +52 -0
- package/skills/wp-phpstan/references/third-party-classes.md +76 -0
- package/skills/wp-phpstan/references/wordpress-annotations.md +124 -0
- package/skills/wp-phpstan/scripts/phpstan_inspect.mjs +263 -0
- package/skills/wp-playground/SKILL.md +103 -0
- package/skills/wp-playground/references/blueprints.md +36 -0
- package/skills/wp-playground/references/cli-commands.md +39 -0
- package/skills/wp-playground/references/debugging.md +16 -0
- package/skills/wp-plugin-development/SKILL.md +114 -0
- package/skills/wp-plugin-development/references/data-and-cron.md +19 -0
- package/skills/wp-plugin-development/references/debugging.md +19 -0
- package/skills/wp-plugin-development/references/lifecycle.md +33 -0
- package/skills/wp-plugin-development/references/security.md +29 -0
- package/skills/wp-plugin-development/references/settings-api.md +22 -0
- package/skills/wp-plugin-development/references/structure.md +16 -0
- package/skills/wp-plugin-development/scripts/detect_plugins.mjs +122 -0
- package/skills/wp-project-triage/SKILL.md +40 -0
- package/skills/wp-project-triage/references/triage.schema.json +143 -0
- package/skills/wp-project-triage/scripts/detect_wp_project.mjs +592 -0
- package/skills/wp-rest-api/SKILL.md +116 -0
- package/skills/wp-rest-api/references/authentication.md +18 -0
- package/skills/wp-rest-api/references/custom-content-types.md +20 -0
- package/skills/wp-rest-api/references/discovery-and-params.md +20 -0
- package/skills/wp-rest-api/references/responses-and-fields.md +30 -0
- package/skills/wp-rest-api/references/routes-and-endpoints.md +36 -0
- package/skills/wp-rest-api/references/schema.md +22 -0
- package/skills/wp-wpcli-and-ops/SKILL.md +125 -0
- package/skills/wp-wpcli-and-ops/references/automation.md +30 -0
- package/skills/wp-wpcli-and-ops/references/cron-and-cache.md +23 -0
- package/skills/wp-wpcli-and-ops/references/debugging.md +17 -0
- package/skills/wp-wpcli-and-ops/references/multisite.md +22 -0
- package/skills/wp-wpcli-and-ops/references/packages-and-updates.md +22 -0
- package/skills/wp-wpcli-and-ops/references/safety.md +30 -0
- package/skills/wp-wpcli-and-ops/references/search-replace.md +40 -0
- package/skills/wp-wpcli-and-ops/scripts/wpcli_inspect.mjs +90 -0
- package/skills/wpds/SKILL.md +60 -0
- package/skills/wpds/references/wpds-mcp-setup.md +59 -0
package/docs/GUIDE.md
ADDED
|
@@ -0,0 +1,1190 @@
|
|
|
1
|
+
# WordPress Manager - Guida Completa per Utenti e Amministratori
|
|
2
|
+
|
|
3
|
+
**Versione:** 1.4.0
|
|
4
|
+
**Ultimo aggiornamento:** 2026-02-27
|
|
5
|
+
**Repository:** https://github.com/morrealev/wordpress-manager
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Indice
|
|
10
|
+
|
|
11
|
+
1. [Introduzione](#1-introduzione)
|
|
12
|
+
2. [Architettura del Plugin](#2-architettura-del-plugin)
|
|
13
|
+
3. [Installazione e Configurazione](#3-installazione-e-configurazione)
|
|
14
|
+
4. [Guida Rapida - Primi Passi](#4-guida-rapida---primi-passi)
|
|
15
|
+
5. [Comandi Slash - Riferimento Completo](#5-comandi-slash---riferimento-completo)
|
|
16
|
+
6. [Agenti Specializzati](#6-agenti-specializzati)
|
|
17
|
+
7. [Skills Operative - Gestione Siti Live](#7-skills-operative---gestione-siti-live)
|
|
18
|
+
8. [Skills di Sviluppo - Costruire Progetti WordPress](#8-skills-di-sviluppo---costruire-progetti-wordpress)
|
|
19
|
+
9. [Hook di Sicurezza](#9-hook-di-sicurezza)
|
|
20
|
+
10. [MCP Server - Architettura Tecnica](#10-mcp-server---architettura-tecnica)
|
|
21
|
+
11. [Gestione Multi-Sito](#11-gestione-multi-sito)
|
|
22
|
+
12. [Scenari d'Uso Comuni](#12-scenari-duso-comuni)
|
|
23
|
+
13. [Amministrazione Avanzata](#13-amministrazione-avanzata)
|
|
24
|
+
14. [Troubleshooting](#14-troubleshooting)
|
|
25
|
+
15. [Glossario](#15-glossario)
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 1. Introduzione
|
|
30
|
+
|
|
31
|
+
### Cos'e il WordPress Manager
|
|
32
|
+
|
|
33
|
+
WordPress Manager e un plugin per **Claude Code** (la CLI ufficiale di Anthropic) che trasforma Claude in un amministratore WordPress completo. Invece di accedere manualmente alla dashboard WordPress, al pannello Hostinger e alla riga di comando SSH, puoi gestire tutto attraverso conversazioni in linguaggio naturale.
|
|
34
|
+
|
|
35
|
+
### Cosa puoi fare
|
|
36
|
+
|
|
37
|
+
- **Gestire contenuti**: creare, modificare, pubblicare post e pagine
|
|
38
|
+
- **Monitorare lo stato**: controllare salute del sito, SSL, plugin attivi
|
|
39
|
+
- **Effettuare deploy**: distribuire plugin, temi e siti statici in produzione
|
|
40
|
+
- **Eseguire audit**: sicurezza, performance e SEO con report strutturati
|
|
41
|
+
- **Gestire backup**: creare, verificare e ripristinare backup completi
|
|
42
|
+
- **Migrare siti**: trasferire WordPress tra hosting diversi
|
|
43
|
+
- **Amministrare infrastruttura**: DNS, domini, certificati SSL via Hostinger
|
|
44
|
+
- **Sviluppare blocchi Gutenberg**: creare e testare blocchi custom con block.json
|
|
45
|
+
- **Costruire temi a blocchi**: sviluppare block theme con theme.json, template e pattern
|
|
46
|
+
- **Creare plugin**: architettura plugin, hook, Settings API, REST endpoint
|
|
47
|
+
- **Analizzare codice**: static analysis con PHPStan, profiling con WP-CLI
|
|
48
|
+
- **Testare in sandbox**: WordPress Playground per ambienti disposable
|
|
49
|
+
- **Progettare UI WordPress**: componenti WPDS, design token, pattern
|
|
50
|
+
|
|
51
|
+
### Requisiti
|
|
52
|
+
|
|
53
|
+
| Requisito | Dettaglio |
|
|
54
|
+
|-----------|---------- |
|
|
55
|
+
| Claude Code | CLI installata e autenticata |
|
|
56
|
+
| Node.js | >= 18.0 |
|
|
57
|
+
| WordPress | >= 5.0 con REST API abilitata (default) |
|
|
58
|
+
| Accesso admin | Per generare Application Password |
|
|
59
|
+
| Hostinger (opzionale) | API token per gestione infrastruttura |
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 2. Architettura del Plugin
|
|
64
|
+
|
|
65
|
+
### Schema Generale
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
Claude Code
|
|
69
|
+
|
|
|
70
|
+
wordpress-manager plugin
|
|
71
|
+
/ | \
|
|
72
|
+
Hostinger MCP WP REST Bridge WordPress.com MCP
|
|
73
|
+
(119 tool) (40 tool) (~15 tool)
|
|
74
|
+
| | |
|
|
75
|
+
Infrastruttura Contenuti + Siti hosted
|
|
76
|
+
DNS, SSL, VPS Plugin, Utenti su WordPress.com
|
|
77
|
+
| |
|
|
78
|
+
Hostinger API WordPress REST API v2
|
|
79
|
+
| |
|
|
80
|
+
hostinger.com tuosito.com/wp-json/
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Componenti del Plugin
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
wordpress-manager/ # v1.4.0
|
|
87
|
+
+-- .claude-plugin/plugin.json # Manifest
|
|
88
|
+
+-- .mcp.json # Server MCP bundled
|
|
89
|
+
+-- LICENSE # MIT + GPL-2.0-or-later
|
|
90
|
+
+-- CHANGELOG.md # Cronologia versioni
|
|
91
|
+
+-- agents/ # 5 agenti specializzati
|
|
92
|
+
| +-- wp-site-manager.md # Orchestratore centrale
|
|
93
|
+
| +-- wp-deployment-engineer.md # Specialista deploy
|
|
94
|
+
| +-- wp-content-strategist.md # Contenuti e SEO
|
|
95
|
+
| +-- wp-security-auditor.md # Audit sicurezza
|
|
96
|
+
| +-- wp-performance-optimizer.md # Performance e CWV
|
|
97
|
+
+-- commands/ # 5 slash commands
|
|
98
|
+
| +-- wp-status.md / wp-deploy.md / wp-audit.md / wp-backup.md / wp-setup.md
|
|
99
|
+
+-- skills/ # 18 skill totali
|
|
100
|
+
| +-- [OPERATIVE - 5 skill]
|
|
101
|
+
| +-- wp-deploy/ # Procedure deploy
|
|
102
|
+
| +-- wp-audit/ # Checklist audit
|
|
103
|
+
| +-- wp-content/ # Template contenuti
|
|
104
|
+
| +-- wp-migrate/ # Procedure migrazione
|
|
105
|
+
| +-- wp-backup/ # Strategie backup
|
|
106
|
+
| +-- [SVILUPPO - 13 skill da WordPress/agent-skills]
|
|
107
|
+
| +-- wordpress-router/ # Router unificato (dev + ops)
|
|
108
|
+
| +-- wp-project-triage/ # Auto-detect tipo progetto
|
|
109
|
+
| +-- wp-block-development/ # Blocchi Gutenberg
|
|
110
|
+
| +-- wp-block-themes/ # Temi a blocchi
|
|
111
|
+
| +-- wp-plugin-development/ # Architettura plugin
|
|
112
|
+
| +-- wp-rest-api/ # Endpoint REST
|
|
113
|
+
| +-- wp-interactivity-api/ # Interactivity API
|
|
114
|
+
| +-- wp-abilities-api/ # Abilities API
|
|
115
|
+
| +-- wp-wpcli-and-ops/ # WP-CLI
|
|
116
|
+
| +-- wp-phpstan/ # Analisi statica
|
|
117
|
+
| +-- wp-performance/ # Profiling backend
|
|
118
|
+
| +-- wp-playground/ # Sandbox disposable
|
|
119
|
+
| +-- wpds/ # WordPress Design System
|
|
120
|
+
+-- hooks/ # 6 hook di sicurezza
|
|
121
|
+
| +-- hooks.json # 4 prompt + 2 command
|
|
122
|
+
| +-- scripts/ # Script per hook command-type
|
|
123
|
+
+-- scripts/ # Utility
|
|
124
|
+
+-- servers/wp-rest-bridge/ # MCP Server custom (TypeScript)
|
|
125
|
+
+-- docs/ # Documentazione
|
|
126
|
+
+-- GUIDE.md # Questa guida
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Come Interagiscono i Componenti
|
|
130
|
+
|
|
131
|
+
1. **L'utente parla a Claude** in linguaggio naturale
|
|
132
|
+
2. **Claude attiva uno skill** se il contesto lo richiede (es. "fai un backup" -> skill wp-backup)
|
|
133
|
+
3. **Claude invoca un agent** per compiti complessi (es. audit sicurezza -> wp-security-auditor)
|
|
134
|
+
4. **L'agent usa i tool MCP** per interagire con WordPress e Hostinger
|
|
135
|
+
5. **Gli hook intercettano** operazioni pericolose e chiedono conferma
|
|
136
|
+
6. **Claude presenta i risultati** all'utente in formato strutturato
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## 3. Installazione e Configurazione
|
|
141
|
+
|
|
142
|
+
### 3.1 Installazione del Plugin
|
|
143
|
+
|
|
144
|
+
Il plugin si installa come plugin locale di Claude Code:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
# Clona il repository nella directory dei plugin locali
|
|
148
|
+
git clone https://github.com/morrealev/wordpress-manager.git \
|
|
149
|
+
~/.claude/plugins/local/wordpress-manager
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### 3.2 Build del Server MCP
|
|
153
|
+
|
|
154
|
+
Il WP REST Bridge e un server TypeScript che va compilato:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
cd ~/.claude/plugins/local/wordpress-manager/servers/wp-rest-bridge
|
|
158
|
+
npm install
|
|
159
|
+
npx tsc
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Questo crea la directory `build/` con i file JavaScript compilati.
|
|
163
|
+
|
|
164
|
+
### 3.3 Abilitazione del Plugin
|
|
165
|
+
|
|
166
|
+
Aggiungi il plugin alla configurazione di Claude Code in `~/.claude/settings.json`:
|
|
167
|
+
|
|
168
|
+
```json
|
|
169
|
+
{
|
|
170
|
+
"enabledPlugins": {
|
|
171
|
+
"wordpress-manager@local": true
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### 3.4 Configurazione Credenziali
|
|
177
|
+
|
|
178
|
+
Crea o aggiorna il file `~/.claude/mcp-secrets.env`:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
# --- Hostinger API (opzionale, per gestione infrastruttura) ---
|
|
182
|
+
export HOSTINGER_API_TOKEN="il-tuo-token-hostinger"
|
|
183
|
+
|
|
184
|
+
# --- WordPress Sites Config ---
|
|
185
|
+
# Array JSON con le credenziali di ogni sito WordPress
|
|
186
|
+
export WP_SITES_CONFIG='[
|
|
187
|
+
{
|
|
188
|
+
"id": "miosito",
|
|
189
|
+
"url": "https://miosito.com",
|
|
190
|
+
"username": "admin@miosito.com",
|
|
191
|
+
"password": "xxxx xxxx xxxx xxxx"
|
|
192
|
+
}
|
|
193
|
+
]'
|
|
194
|
+
export WP_DEFAULT_SITE="miosito"
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Aggiungi al tuo `~/.bashrc` o `~/.zshrc`:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
source ~/.claude/mcp-secrets.env
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### 3.5 Generare una Application Password
|
|
204
|
+
|
|
205
|
+
Le Application Password sono il metodo di autenticazione raccomandato per la REST API di WordPress:
|
|
206
|
+
|
|
207
|
+
1. Accedi alla dashboard WordPress come amministratore
|
|
208
|
+
2. Vai su **Utenti > Profilo** (o **Users > Profile**)
|
|
209
|
+
3. Scorri fino a **Application Passwords**
|
|
210
|
+
4. Inserisci un nome (es. "Claude Code") e clicca **Aggiungi nuova password**
|
|
211
|
+
5. **Copia la password generata** - viene mostrata una sola volta
|
|
212
|
+
6. Il formato e tipo `xxxx xxxx xxxx xxxx xxxx xxxx` (6 gruppi di 4 caratteri)
|
|
213
|
+
|
|
214
|
+
> **Attenzione**: NON usare la password dell'account WordPress. Usa sempre una Application Password dedicata.
|
|
215
|
+
|
|
216
|
+
### 3.6 Generare un Token Hostinger API
|
|
217
|
+
|
|
218
|
+
Se il tuo sito e su Hostinger:
|
|
219
|
+
|
|
220
|
+
1. Accedi a [hostinger.com](https://www.hostinger.com)
|
|
221
|
+
2. Vai su **Account > API** oppure direttamente a [hostinger.com/my-api](https://www.hostinger.com/my-api)
|
|
222
|
+
3. Crea un nuovo token API
|
|
223
|
+
4. Copia il token e aggiungilo a `mcp-secrets.env`
|
|
224
|
+
|
|
225
|
+
### 3.7 Verifica Installazione
|
|
226
|
+
|
|
227
|
+
Esegui il health check per verificare che tutto funzioni:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
source ~/.claude/mcp-secrets.env
|
|
231
|
+
bash ~/.claude/plugins/local/wordpress-manager/scripts/health-check.sh
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Output atteso:
|
|
235
|
+
|
|
236
|
+
```
|
|
237
|
+
=== WordPress Health Check ===
|
|
238
|
+
Site: https://miosito.com
|
|
239
|
+
|
|
240
|
+
[1/5] Site Reachability
|
|
241
|
+
PASS Site responds (HTTP 200)
|
|
242
|
+
[2/5] SSL Certificate
|
|
243
|
+
PASS SSL valid (XX days remaining)
|
|
244
|
+
[3/5] WordPress REST API
|
|
245
|
+
PASS REST API reachable (HTTP 200)
|
|
246
|
+
[4/5] Authentication
|
|
247
|
+
PASS Authenticated as 'admin@miosito.com' (ID: 1)
|
|
248
|
+
[5/5] Hostinger API
|
|
249
|
+
PASS Hostinger API reachable (HTTP 200)
|
|
250
|
+
|
|
251
|
+
=== Health Check Complete ===
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## 4. Guida Rapida - Primi Passi
|
|
257
|
+
|
|
258
|
+
### Primo utilizzo
|
|
259
|
+
|
|
260
|
+
Dopo l'installazione, avvia una nuova sessione Claude Code e prova questi comandi:
|
|
261
|
+
|
|
262
|
+
**Controllare lo stato del sito:**
|
|
263
|
+
```
|
|
264
|
+
/wordpress-manager:wp-status
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Elencare i post recenti:**
|
|
268
|
+
```
|
|
269
|
+
Mostrami gli ultimi 5 post su miosito
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
**Verificare i plugin attivi:**
|
|
273
|
+
```
|
|
274
|
+
Quali plugin sono attivi sul mio sito WordPress?
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Frasario - Come Chiedere le Cose
|
|
278
|
+
|
|
279
|
+
WordPress Manager comprende richieste in linguaggio naturale. Ecco come formulare le richieste piu comuni:
|
|
280
|
+
|
|
281
|
+
| Cosa vuoi fare | Come chiederlo |
|
|
282
|
+
|----------------|----------------|
|
|
283
|
+
| Controllare lo stato | "Come sta il mio sito?" / "Status di opencactus" |
|
|
284
|
+
| Creare un post | "Crea un post su..." / "Scrivi un articolo su..." |
|
|
285
|
+
| Deploy un plugin | "Deploya il plugin X" / "Pusha il tema in produzione" |
|
|
286
|
+
| Audit sicurezza | "Fai un audit di sicurezza" / "Controlla la sicurezza del sito" |
|
|
287
|
+
| Audit performance | "Controlla le performance" / "Come va la velocita del sito?" |
|
|
288
|
+
| Audit SEO | "Analizza la SEO" / "Come e messa la SEO?" |
|
|
289
|
+
| Creare un backup | "Fai un backup" / "Backup del sito" |
|
|
290
|
+
| Ripristinare un backup | "Ripristina il backup" / "Restore dal backup di ieri" |
|
|
291
|
+
| Migrare un sito | "Migra il sito su Hostinger" / "Trasferisci il sito" |
|
|
292
|
+
| Aggiungere un nuovo sito | "Configura un nuovo sito WordPress" |
|
|
293
|
+
| Cambiare sito attivo | "Passa al sito bioinagro" / "Switch a opencactus" |
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## 5. Comandi Slash - Riferimento Completo
|
|
298
|
+
|
|
299
|
+
I comandi slash sono scorciatoie dirette per operazioni specifiche. Si invocano con il prefisso `/wordpress-manager:`.
|
|
300
|
+
|
|
301
|
+
### /wordpress-manager:wp-status
|
|
302
|
+
|
|
303
|
+
**Scopo**: Health check rapido del sito.
|
|
304
|
+
|
|
305
|
+
**Cosa controlla**:
|
|
306
|
+
- Raggiungibilita del sito (HTTP)
|
|
307
|
+
- Stato REST API
|
|
308
|
+
- Conteggio contenuti (post, pagine)
|
|
309
|
+
- Plugin attivi e conteggio
|
|
310
|
+
- Certificato SSL (giorni rimanenti)
|
|
311
|
+
- Stato Hostinger API (se configurato)
|
|
312
|
+
|
|
313
|
+
**Livelli di severita nell'output**:
|
|
314
|
+
- **CRITICAL**: Sito irraggiungibile, SSL scaduto, autenticazione fallita
|
|
315
|
+
- **WARNING**: SSL in scadenza < 30 giorni, Hostinger frozen, troppi plugin (> 20)
|
|
316
|
+
- **INFO**: Tutto funzionante
|
|
317
|
+
|
|
318
|
+
**Esempio d'uso**:
|
|
319
|
+
```
|
|
320
|
+
/wordpress-manager:wp-status
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
### /wordpress-manager:wp-deploy
|
|
326
|
+
|
|
327
|
+
**Scopo**: Deploy di plugin, temi o siti statici in produzione.
|
|
328
|
+
|
|
329
|
+
**Sintassi**:
|
|
330
|
+
```
|
|
331
|
+
/wordpress-manager:wp-deploy plugin <percorso> to <sito>
|
|
332
|
+
/wordpress-manager:wp-deploy theme <percorso> to <sito>
|
|
333
|
+
/wordpress-manager:wp-deploy static <percorso> to <sito>
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
**Processo**:
|
|
337
|
+
1. Verifica che i file locali esistano
|
|
338
|
+
2. Validazione sintattica (PHP lint per plugin/temi)
|
|
339
|
+
3. Controllo assenza credenziali hardcoded nei file
|
|
340
|
+
4. Conferma utente prima di procedere
|
|
341
|
+
5. Deploy via Hostinger MCP o SSH
|
|
342
|
+
6. Verifica post-deploy
|
|
343
|
+
|
|
344
|
+
**Metodi di deploy**:
|
|
345
|
+
|
|
346
|
+
| Hosting | Metodo | Tool utilizzati |
|
|
347
|
+
|---------|--------|----------------|
|
|
348
|
+
| Hostinger | Hostinger MCP | `hosting_deployWordpressPlugin`, `hosting_deployWordpressTheme` |
|
|
349
|
+
| Altro con SSH | SSH/SCP | Comandi bash via SSH |
|
|
350
|
+
| Importazione completa | Hostinger MCP | `hosting_importWordpressWebsite` |
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
### /wordpress-manager:wp-audit
|
|
355
|
+
|
|
356
|
+
**Scopo**: Audit approfondito del sito.
|
|
357
|
+
|
|
358
|
+
**Sintassi**:
|
|
359
|
+
```
|
|
360
|
+
/wordpress-manager:wp-audit # Audit completo
|
|
361
|
+
/wordpress-manager:wp-audit security # Solo sicurezza
|
|
362
|
+
/wordpress-manager:wp-audit performance # Solo performance
|
|
363
|
+
/wordpress-manager:wp-audit seo # Solo SEO
|
|
364
|
+
/wordpress-manager:wp-audit full on <sito> # Completo su sito specifico
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
**Audit Sicurezza** (5 fasi):
|
|
368
|
+
1. Sicurezza plugin (versioni obsolete, vulnerabilita note)
|
|
369
|
+
2. Account utente (password deboli, ruoli eccessivi, utenti inattivi)
|
|
370
|
+
3. Integrita contenuti (commenti spam, link malevoli)
|
|
371
|
+
4. DNS/SSL (configurazione HTTPS, DNSSEC, email SPF/DKIM)
|
|
372
|
+
5. Configurazione hosting (permessi file, wp-config.php hardening)
|
|
373
|
+
|
|
374
|
+
**Audit Performance** (5 fasi):
|
|
375
|
+
1. Impatto plugin (plugin pesanti, conflitti)
|
|
376
|
+
2. Caching (page cache, object cache, CDN)
|
|
377
|
+
3. Media (immagini non ottimizzate, dimensioni eccessive)
|
|
378
|
+
4. Core Web Vitals (LCP < 2.5s, INP < 200ms, CLS < 0.1)
|
|
379
|
+
5. Configurazione server (PHP memory, max execution time)
|
|
380
|
+
|
|
381
|
+
**Audit SEO** (7 aree):
|
|
382
|
+
1. SEO tecnico (sitemap, robots.txt, canonical URL)
|
|
383
|
+
2. SEO on-page (title, meta description, headings)
|
|
384
|
+
3. Dati strutturati (Schema.org, Rich Snippets)
|
|
385
|
+
4. Velocita sito (impatto su ranking)
|
|
386
|
+
5. SEO locale (Google My Business, NAP)
|
|
387
|
+
6. Architettura contenuti (struttura URL, link interni)
|
|
388
|
+
7. Impostazioni WordPress specifiche (permalink, categorie)
|
|
389
|
+
|
|
390
|
+
**Output**: Report con findings classificati per severity (Critical > High > Medium > Low > Info), piano d'azione prioritizzato, sezione "quick wins" (azioni < 1 ora).
|
|
391
|
+
|
|
392
|
+
---
|
|
393
|
+
|
|
394
|
+
### /wordpress-manager:wp-backup
|
|
395
|
+
|
|
396
|
+
**Scopo**: Gestione backup del sito.
|
|
397
|
+
|
|
398
|
+
**Sintassi**:
|
|
399
|
+
```
|
|
400
|
+
/wordpress-manager:wp-backup create # Backup sito attivo
|
|
401
|
+
/wordpress-manager:wp-backup create on <sito> # Backup sito specifico
|
|
402
|
+
/wordpress-manager:wp-backup list # Elenco backup disponibili
|
|
403
|
+
/wordpress-manager:wp-backup restore <id> # Ripristino da backup
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
**Metodi di backup disponibili**:
|
|
407
|
+
|
|
408
|
+
| Metodo | Scope | Requisiti |
|
|
409
|
+
|--------|-------|-----------|
|
|
410
|
+
| SSH + mysqldump | Database + file completi | Accesso SSH al server |
|
|
411
|
+
| Hostinger snapshot | Snapshot VPS completo | Hosting VPS su Hostinger |
|
|
412
|
+
| API export | Solo contenuti (post, pagine, tassonomie) | Solo accesso REST API |
|
|
413
|
+
|
|
414
|
+
**Strategia di retention raccomandata**:
|
|
415
|
+
|
|
416
|
+
| Tipo | Frequenza | Conservazione |
|
|
417
|
+
|------|-----------|---------------|
|
|
418
|
+
| Database | Giornaliero | 7 giorni |
|
|
419
|
+
| File | Settimanale | 4 settimane |
|
|
420
|
+
| Full site | Mensile | 3 mesi |
|
|
421
|
+
| Pre-deploy | Prima di ogni deploy | Fino a verifica deploy |
|
|
422
|
+
|
|
423
|
+
> **Regola aurea**: Non cancellare mai un vecchio backup finche il nuovo non e stato verificato.
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
### /wordpress-manager:wp-setup
|
|
428
|
+
|
|
429
|
+
**Scopo**: Aggiungere un nuovo sito WordPress al plugin.
|
|
430
|
+
|
|
431
|
+
**Sintassi**:
|
|
432
|
+
```
|
|
433
|
+
/wordpress-manager:wp-setup # Wizard interattivo
|
|
434
|
+
/wordpress-manager:wp-setup https://miosito.com # Setup sito specifico
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
**Processo in 6 step**:
|
|
438
|
+
|
|
439
|
+
1. **Raccolta informazioni**: URL sito, ID breve, username, Application Password, hosting provider
|
|
440
|
+
2. **Configurazione credenziali**: Aggiunta a `WP_SITES_CONFIG` in `mcp-secrets.env`
|
|
441
|
+
3. **Verifica connettivita**: Test API REST, content types, autenticazione
|
|
442
|
+
4. **Configurazione Hostinger**: Se applicabile, verifica API token e capabilities
|
|
443
|
+
5. **Status check iniziale**: Baseline del sito (conteggi contenuti, plugin, ecc.)
|
|
444
|
+
6. **Report**: Riepilogo configurazione completata
|
|
445
|
+
|
|
446
|
+
**Prerequisiti** per l'utente:
|
|
447
|
+
- Accesso admin al WordPress per generare Application Password
|
|
448
|
+
- REST API abilitata (default dal WordPress 4.7)
|
|
449
|
+
- Se Hostinger: API token dal pannello
|
|
450
|
+
|
|
451
|
+
---
|
|
452
|
+
|
|
453
|
+
## 6. Agenti Specializzati
|
|
454
|
+
|
|
455
|
+
Gli agenti sono "personalita" specializzate di Claude che vengono attivate automaticamente in base al contesto della conversazione. Non devi invocarli manualmente - Claude sceglie l'agente giusto per il compito.
|
|
456
|
+
|
|
457
|
+
### wp-site-manager (Orchestratore)
|
|
458
|
+
|
|
459
|
+
| Proprieta | Valore |
|
|
460
|
+
|-----------|--------|
|
|
461
|
+
| Colore | Cyan |
|
|
462
|
+
| Ruolo | Coordinamento multi-sito, status monitoring, diagnostica |
|
|
463
|
+
| Attivazione | Status check, operazioni multi-sito, diagnostica generale |
|
|
464
|
+
|
|
465
|
+
**Capacita**:
|
|
466
|
+
- Gestione unificata di siti self-hosted e WordPress.com
|
|
467
|
+
- Monitoraggio salute sito (HTTP, SSL, API, Hostinger)
|
|
468
|
+
- Switching tra siti multipli
|
|
469
|
+
- Coordinamento tra tool Hostinger e WP REST Bridge
|
|
470
|
+
|
|
471
|
+
**Esempio attivazione**: "Come sta il mio sito?", "Passa al sito opencactus", "Elenca tutti i siti configurati"
|
|
472
|
+
|
|
473
|
+
---
|
|
474
|
+
|
|
475
|
+
### wp-deployment-engineer (Deploy)
|
|
476
|
+
|
|
477
|
+
| Proprieta | Valore |
|
|
478
|
+
|-----------|--------|
|
|
479
|
+
| Colore | Green |
|
|
480
|
+
| Ruolo | Pipeline di deployment sicure |
|
|
481
|
+
| Attivazione | Deploy plugin/temi, push in produzione, migrazione file |
|
|
482
|
+
|
|
483
|
+
**Workflow di deploy**:
|
|
484
|
+
1. Pre-flight: verifica file, syntax check PHP, scan credenziali
|
|
485
|
+
2. Backup: assicura rollback path
|
|
486
|
+
3. Deploy: Hostinger MCP o SSH
|
|
487
|
+
4. Post-deploy: verifica, test, report
|
|
488
|
+
|
|
489
|
+
**3 metodi supportati**:
|
|
490
|
+
- **Hostinger MCP**: `hosting_deployWordpressPlugin`, `hosting_deployWordpressTheme`
|
|
491
|
+
- **SSH/SCP**: Upload e estrazione via comandi SSH
|
|
492
|
+
- **Full import**: `hosting_importWordpressWebsite` per migrazioni complete
|
|
493
|
+
|
|
494
|
+
---
|
|
495
|
+
|
|
496
|
+
### wp-content-strategist (Contenuti)
|
|
497
|
+
|
|
498
|
+
| Proprieta | Valore |
|
|
499
|
+
|-----------|--------|
|
|
500
|
+
| Colore | Magenta |
|
|
501
|
+
| Ruolo | Creazione contenuti, SEO, gestione editoriale |
|
|
502
|
+
| Attivazione | Creazione post, ottimizzazione SEO, gestione tassonomie |
|
|
503
|
+
|
|
504
|
+
**Ciclo di vita contenuti**:
|
|
505
|
+
```
|
|
506
|
+
IDEAZIONE -> BOZZA -> REVISIONE -> OTTIMIZZAZIONE -> PUBBLICAZIONE -> MONITORAGGIO
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
**Capacita SEO**:
|
|
510
|
+
- Ottimizzazione title tag e meta description
|
|
511
|
+
- Gerarchia heading (H1 > H2 > H3)
|
|
512
|
+
- Internal linking con modello Pillar-Cluster
|
|
513
|
+
- Dati strutturati (Article, Product, FAQ)
|
|
514
|
+
- Analisi keyword density
|
|
515
|
+
|
|
516
|
+
**6 template disponibili**: Blog standard, Listicle, How-To Guide, Landing Page, About Page, Product Page
|
|
517
|
+
|
|
518
|
+
---
|
|
519
|
+
|
|
520
|
+
### wp-security-auditor (Sicurezza)
|
|
521
|
+
|
|
522
|
+
| Proprieta | Valore |
|
|
523
|
+
|-----------|--------|
|
|
524
|
+
| Colore | Red |
|
|
525
|
+
| Ruolo | Audit sicurezza e hardening |
|
|
526
|
+
| Attivazione | "Controlla la sicurezza", "audit sicurezza", "hardening" |
|
|
527
|
+
|
|
528
|
+
**5 fasi di audit**:
|
|
529
|
+
|
|
530
|
+
| Fase | Cosa controlla |
|
|
531
|
+
|------|---------------|
|
|
532
|
+
| Plugin Security | Versioni obsolete, plugin abbandonati, vulnerabilita note |
|
|
533
|
+
| User Accounts | Password deboli, ruoli eccessivi, utenti admin superflui |
|
|
534
|
+
| Content Integrity | Commenti spam, iniezioni di link, contenuti sospetti |
|
|
535
|
+
| DNS/SSL | HTTPS forzato, HSTS, SPF/DKIM per email |
|
|
536
|
+
| Server Config | Permessi file, wp-config.php, .htaccess rules |
|
|
537
|
+
|
|
538
|
+
**Classificazione severity**:
|
|
539
|
+
- **CRITICAL**: Vulnerabilita attivamente sfruttabili
|
|
540
|
+
- **HIGH**: Rischi significativi che richiedono azione immediata
|
|
541
|
+
- **MEDIUM**: Problemi da risolvere nella prossima manutenzione
|
|
542
|
+
- **LOW**: Miglioramenti raccomandati
|
|
543
|
+
- **INFO**: Best practice e suggerimenti
|
|
544
|
+
|
|
545
|
+
---
|
|
546
|
+
|
|
547
|
+
### wp-performance-optimizer (Performance)
|
|
548
|
+
|
|
549
|
+
| Proprieta | Valore |
|
|
550
|
+
|-----------|--------|
|
|
551
|
+
| Colore | Yellow |
|
|
552
|
+
| Ruolo | Ottimizzazione performance e Core Web Vitals |
|
|
553
|
+
| Attivazione | "Controlla la velocita", "performance", "Core Web Vitals" |
|
|
554
|
+
|
|
555
|
+
**Target Core Web Vitals**:
|
|
556
|
+
|
|
557
|
+
| Metrica | Target | Cosa misura |
|
|
558
|
+
|---------|--------|-------------|
|
|
559
|
+
| LCP (Largest Contentful Paint) | < 2.5s | Velocita caricamento elemento principale |
|
|
560
|
+
| INP (Interaction to Next Paint) | < 200ms | Reattivita alle interazioni utente |
|
|
561
|
+
| CLS (Cumulative Layout Shift) | < 0.1 | Stabilita visiva durante caricamento |
|
|
562
|
+
|
|
563
|
+
**Plugin pesanti noti** (dall'audit):
|
|
564
|
+
- Elementor Pro, WPBakery, Divi (page builder)
|
|
565
|
+
- Wordfence, Sucuri (security con scanning pesante)
|
|
566
|
+
- WooCommerce (con molte estensioni)
|
|
567
|
+
- Jetpack (quando attivato completamente)
|
|
568
|
+
|
|
569
|
+
---
|
|
570
|
+
|
|
571
|
+
## 7. Skills Operative - Gestione Siti Live
|
|
572
|
+
|
|
573
|
+
Le skill sono "librerie di conoscenza" che Claude attiva automaticamente quando il contesto della conversazione corrisponde alla loro area. Non sono comandi - sono conoscenza specializzata che migliora le risposte.
|
|
574
|
+
|
|
575
|
+
### Panoramica Skills Operative (5)
|
|
576
|
+
|
|
577
|
+
| Skill | Si attiva quando... | Reference files inclusi |
|
|
578
|
+
|-------|---------------------|------------------------|
|
|
579
|
+
| wp-deploy | "deploy", "push to production", "deploya" | hostinger-deploy.md, ssh-deploy.md |
|
|
580
|
+
| wp-audit | "audit", "security check", "controlla sicurezza" | security-checklist.md, performance-checklist.md, seo-checklist.md |
|
|
581
|
+
| wp-content | "crea un post", "scrivi un articolo", "SEO" | content-templates.md, seo-optimization.md |
|
|
582
|
+
| wp-migrate | "migra il sito", "sposta su Hostinger", "trasferisci" | hostinger-migration.md, cross-platform.md |
|
|
583
|
+
| wp-backup | "backup", "crea un backup", "ripristina" | backup-strategies.md, restore-procedures.md |
|
|
584
|
+
|
|
585
|
+
### Come Funzionano
|
|
586
|
+
|
|
587
|
+
Quando dici "fai un backup del mio sito", Claude:
|
|
588
|
+
1. Riconosce il contesto -> attiva la skill `wp-backup`
|
|
589
|
+
2. Carica `SKILL.md` -> decision tree per scegliere il metodo
|
|
590
|
+
3. Consulta `references/backup-strategies.md` -> comandi specifici
|
|
591
|
+
4. Esegue il workflow guidato dalla skill
|
|
592
|
+
|
|
593
|
+
Le skill NON sostituiscono i comandi slash. I comandi sono entry point espliciti; le skill sono conoscenza di background che arricchisce qualsiasi conversazione correlata.
|
|
594
|
+
|
|
595
|
+
---
|
|
596
|
+
|
|
597
|
+
## 8. Skills di Sviluppo - Costruire Progetti WordPress
|
|
598
|
+
|
|
599
|
+
### Origine
|
|
600
|
+
|
|
601
|
+
Le 13 skill di sviluppo sono integrate dal repository community [WordPress/agent-skills](https://github.com/WordPress/agent-skills) (licenza GPL-2.0-or-later). Forniscono conoscenza specializzata per **sviluppare** codice WordPress — blocchi, temi, plugin, endpoint REST, analisi statica e testing.
|
|
602
|
+
|
|
603
|
+
### Il Router Unificato
|
|
604
|
+
|
|
605
|
+
La skill `wordpress-router` e il punto d'ingresso per tutti i task WordPress. Classifica automaticamente il task:
|
|
606
|
+
|
|
607
|
+
```
|
|
608
|
+
Utente: "Crea un blocco custom per la gallery"
|
|
609
|
+
|
|
|
610
|
+
wordpress-router: TASK = sviluppo
|
|
611
|
+
|
|
|
612
|
+
wp-project-triage: TIPO = wp-block-plugin
|
|
613
|
+
|
|
|
614
|
+
wp-block-development: guida creazione blocco
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
```
|
|
618
|
+
Utente: "Deploya il plugin su opencactus"
|
|
619
|
+
|
|
|
620
|
+
wordpress-router: TASK = operativo
|
|
621
|
+
|
|
|
622
|
+
wp-deploy + wp-deployment-engineer: esegue deploy
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
### Panoramica Skills di Sviluppo (13)
|
|
626
|
+
|
|
627
|
+
| Skill | Si attiva quando... | Risorse |
|
|
628
|
+
|-------|---------------------|---------|
|
|
629
|
+
| `wordpress-router` | Qualsiasi task WordPress (classifica e instrada) | decision-tree.md |
|
|
630
|
+
| `wp-project-triage` | Analisi automatica tipo progetto nella directory corrente | detect_wp_project.mjs, triage.schema.json |
|
|
631
|
+
| `wp-block-development` | "crea un blocco", "block.json", "registerBlockType" | 10 reference files, list_blocks.mjs |
|
|
632
|
+
| `wp-block-themes` | "theme.json", "crea un template", "pattern", "Global Styles" | 6 reference files, detect_block_themes.mjs |
|
|
633
|
+
| `wp-plugin-development` | "crea un plugin", "hook", "add_action", "Settings API" | 6 reference files, detect_plugins.mjs |
|
|
634
|
+
| `wp-rest-api` | "register_rest_route", "endpoint REST", "permission_callback" | 6 reference files |
|
|
635
|
+
| `wp-interactivity-api` | "data-wp-*", "Interactivity API", "viewScriptModule" | 3 reference files |
|
|
636
|
+
| `wp-abilities-api` | "wp_register_ability", "Abilities API", "capabilities" | 2 reference files |
|
|
637
|
+
| `wp-wpcli-and-ops` | "WP-CLI", "wp-cli.yml", "scaffold", "wp command" | 7 reference files, wpcli_inspect.mjs |
|
|
638
|
+
| `wp-phpstan` | "PHPStan", "analisi statica", "phpstan.neon" | 3 reference files, phpstan_inspect.mjs |
|
|
639
|
+
| `wp-performance` | "profiling", "wp profile", "wp doctor", "query lente" | 10 reference files, perf_inspect.mjs |
|
|
640
|
+
| `wp-playground` | "Playground", "sandbox", "blueprint", "test disposable" | 3 reference files |
|
|
641
|
+
| `wpds` | "Design System", "@wordpress/components", "design token" | wpds-mcp-setup.md (richiede WPDS MCP server) |
|
|
642
|
+
|
|
643
|
+
### Script di Rilevamento Automatico
|
|
644
|
+
|
|
645
|
+
Le skill di sviluppo includono 7 script Node.js (`.mjs`) che eseguono analisi automatica del progetto:
|
|
646
|
+
|
|
647
|
+
| Script | Cosa rileva |
|
|
648
|
+
|--------|-------------|
|
|
649
|
+
| `detect_wp_project.mjs` | Tipo progetto: plugin, theme, block theme, wp-core, gutenberg |
|
|
650
|
+
| `list_blocks.mjs` | Blocchi registrati nel progetto (block.json files) |
|
|
651
|
+
| `detect_block_themes.mjs` | Struttura block theme: theme.json, templates, patterns |
|
|
652
|
+
| `detect_plugins.mjs` | Plugin headers, hooks registrati, dipendenze |
|
|
653
|
+
| `perf_inspect.mjs` | WP-CLI availability, autoloaded options, object cache |
|
|
654
|
+
| `wpcli_inspect.mjs` | WP-CLI versione, comandi disponibili, configurazione |
|
|
655
|
+
| `phpstan_inspect.mjs` | Configurazione PHPStan, livello analisi, baseline |
|
|
656
|
+
|
|
657
|
+
### WordPress Playground — Ambienti Disposable
|
|
658
|
+
|
|
659
|
+
La skill `wp-playground` permette di creare istanze WordPress temporanee per testing:
|
|
660
|
+
|
|
661
|
+
```bash
|
|
662
|
+
# Spin-up rapido con mount automatico del plugin
|
|
663
|
+
cd mio-plugin/
|
|
664
|
+
npx @wp-playground/cli@latest server --auto-mount
|
|
665
|
+
|
|
666
|
+
# Esecuzione blueprint per setup riproducibile
|
|
667
|
+
npx @wp-playground/cli@latest run-blueprint --blueprint=test-setup.json
|
|
668
|
+
|
|
669
|
+
# Snapshot per condivisione o CI
|
|
670
|
+
npx @wp-playground/cli@latest build-snapshot --blueprint=setup.json --outfile=./site.zip
|
|
671
|
+
```
|
|
672
|
+
|
|
673
|
+
Requisiti: Node.js >= 20.18. Playground gira in WebAssembly con SQLite — **mai** puntare a dati di produzione.
|
|
674
|
+
|
|
675
|
+
### WordPress Design System (WPDS)
|
|
676
|
+
|
|
677
|
+
La skill `wpds` guida la costruzione di UI conformi al Design System di WordPress. Funziona al meglio con il **WPDS MCP server** che espone:
|
|
678
|
+
|
|
679
|
+
- `wpds://components` — catalogo componenti (Button, Modal, TextControl, ...)
|
|
680
|
+
- `wpds://design-tokens` — token di design (colori, spaziatura, tipografia)
|
|
681
|
+
- `wpds://pages` — documentazione e linee guida
|
|
682
|
+
|
|
683
|
+
Senza il server MCP, la skill usa conoscenza generale di `@wordpress/components` e `@wordpress/ui`.
|
|
684
|
+
|
|
685
|
+
### Workflow Tipico di Sviluppo
|
|
686
|
+
|
|
687
|
+
```
|
|
688
|
+
1. cd mio-progetto-wordpress/
|
|
689
|
+
2. Claude esegue wp-project-triage → rileva "wp-block-plugin"
|
|
690
|
+
3. wordpress-router → instrada a wp-block-development
|
|
691
|
+
4. Claude guida la creazione con block.json, edit.js, save.js
|
|
692
|
+
5. wp-playground → test in sandbox disposable
|
|
693
|
+
6. wp-phpstan → analisi statica del codice
|
|
694
|
+
7. wp-deploy → deploy in produzione quando pronto
|
|
695
|
+
```
|
|
696
|
+
|
|
697
|
+
---
|
|
698
|
+
|
|
699
|
+
## 9. Hook di Sicurezza
|
|
700
|
+
|
|
701
|
+
Gli hook sono guardiani automatici che intercettano operazioni pericolose prima che vengano eseguite. Funzionano senza bisogno di attivarli manualmente.
|
|
702
|
+
|
|
703
|
+
### Hook Prompt-Based (Validazione LLM)
|
|
704
|
+
|
|
705
|
+
Questi hook chiedono a Claude di valutare se l'operazione e stata esplicitamente richiesta dall'utente:
|
|
706
|
+
|
|
707
|
+
| # | Operazione | Tool intercettato | Cosa fa |
|
|
708
|
+
|---|-----------|-------------------|---------|
|
|
709
|
+
| 1 | Cancellazione contenuti | `delete_content`, `delete_media`, `delete_user`, `delete_term` | Conferma che l'utente ha esplicitamente richiesto la cancellazione |
|
|
710
|
+
| 2 | Disattivazione plugin | `deactivate_plugin` | Conferma prima di disattivare (potrebbe rompere dipendenze) |
|
|
711
|
+
| 3 | Import WordPress | `hosting_importWordpressWebsite` | Conferma prima di SOVRASCRIVERE l'installazione esistente |
|
|
712
|
+
| 4 | Modifica DNS | `DNS_updateDNSRecordsV1`, `DNS_resetDNSRecordsV1` | Conferma prima di modificare i record DNS |
|
|
713
|
+
|
|
714
|
+
### Hook Command-Based (Validazione Script)
|
|
715
|
+
|
|
716
|
+
Questi hook eseguono script bash per validazioni tecniche:
|
|
717
|
+
|
|
718
|
+
| # | Script | Tool intercettato | Cosa fa |
|
|
719
|
+
|---|--------|-------------------|---------|
|
|
720
|
+
| 5 | `pre-deploy-check.sh` | `hosting_deployWordpressPlugin`, `hosting_deployWordpressTheme`, `hosting_deployStaticWebsite` | Verifica che il sito sia raggiungibile e l'autenticazione funzioni prima del deploy |
|
|
721
|
+
| 6 | `backup-reminder.sh` | `hosting_importWordpressWebsite` | Stampa un reminder per creare un backup prima dell'import |
|
|
722
|
+
|
|
723
|
+
### Come Funzionano Insieme
|
|
724
|
+
|
|
725
|
+
Per un'operazione di import WordPress, la catena e:
|
|
726
|
+
|
|
727
|
+
```
|
|
728
|
+
Utente: "Importa il backup su opencactus"
|
|
729
|
+
|
|
|
730
|
+
Hook #6 (backup-reminder.sh) -> Stampa reminder backup
|
|
731
|
+
|
|
|
732
|
+
Hook #3 (prompt) -> Claude valuta: "L'utente ha chiesto esplicitamente questo import?"
|
|
733
|
+
|
|
|
734
|
+
Se approvato -> Esecuzione hosting_importWordpressWebsite
|
|
735
|
+
```
|
|
736
|
+
|
|
737
|
+
> Gli hook prompt e command si complementano: lo script fa validazione **tecnica** (sito raggiungibile?), il prompt fa validazione **semantica** (l'utente intendeva davvero questo?).
|
|
738
|
+
|
|
739
|
+
---
|
|
740
|
+
|
|
741
|
+
## 10. MCP Server - Architettura Tecnica
|
|
742
|
+
|
|
743
|
+
### Cos'e MCP
|
|
744
|
+
|
|
745
|
+
MCP (Model Context Protocol) e il protocollo che permette a Claude di comunicare con servizi esterni attraverso "tool" - funzioni che Claude puo invocare per leggere dati, creare contenuti, o eseguire operazioni.
|
|
746
|
+
|
|
747
|
+
### I Tre Server MCP del Plugin
|
|
748
|
+
|
|
749
|
+
#### Hostinger MCP
|
|
750
|
+
|
|
751
|
+
| Proprieta | Dettaglio |
|
|
752
|
+
|-----------|---------- |
|
|
753
|
+
| Sorgente | `hostinger-api-mcp@latest` (npm) |
|
|
754
|
+
| Trasporto | stdio (JSON-RPC via stdin/stdout) |
|
|
755
|
+
| Autenticazione | `HOSTINGER_API_TOKEN` env var |
|
|
756
|
+
| Tool disponibili | 119 |
|
|
757
|
+
|
|
758
|
+
**Categorie tool**: Hosting, DNS, SSL, Email, VPS, Domini, Billing.
|
|
759
|
+
|
|
760
|
+
**Quando serve**: Gestione infrastruttura, deploy via Hostinger, gestione DNS, certificati SSL.
|
|
761
|
+
|
|
762
|
+
#### WP REST Bridge
|
|
763
|
+
|
|
764
|
+
| Proprieta | Dettaglio |
|
|
765
|
+
|-----------|---------- |
|
|
766
|
+
| Sorgente | Custom TypeScript server in `servers/wp-rest-bridge/` |
|
|
767
|
+
| Trasporto | stdio (JSON-RPC via stdin/stdout) |
|
|
768
|
+
| Autenticazione | `WP_SITES_CONFIG` JSON env var |
|
|
769
|
+
| Tool disponibili | 40 |
|
|
770
|
+
|
|
771
|
+
**Categorie tool**:
|
|
772
|
+
|
|
773
|
+
| Categoria | Tool | Esempio |
|
|
774
|
+
|-----------|------|---------|
|
|
775
|
+
| Multi-site | 3 | `switch_site`, `list_sites`, `get_active_site` |
|
|
776
|
+
| Content | 8 | `list_content`, `create_content`, `find_content_by_url` |
|
|
777
|
+
| Taxonomies | 8 | `list_terms`, `create_term`, `assign_terms_to_content` |
|
|
778
|
+
| Plugins | 5 | `list_plugins`, `activate_plugin`, `deactivate_plugin` |
|
|
779
|
+
| Users | 5 | `list_users`, `create_user`, `update_user` |
|
|
780
|
+
| Comments | 5 | `list_comments`, `create_comment`, `delete_comment` |
|
|
781
|
+
| Media | 4 | `list_media`, `create_media`, `delete_media` |
|
|
782
|
+
| WP.org | 2 | `search_plugin_repository`, `get_plugin_details` |
|
|
783
|
+
|
|
784
|
+
**Architettura multi-sito**: Il server mantiene una `Map<siteId, AxiosInstance>` dove ogni sito ha la propria istanza HTTP autenticata. Il cambio sito e istantaneo.
|
|
785
|
+
|
|
786
|
+
#### WordPress.com MCP
|
|
787
|
+
|
|
788
|
+
| Proprieta | Dettaglio |
|
|
789
|
+
|-----------|---------- |
|
|
790
|
+
| Sorgente | Integrazione built-in Claude Code |
|
|
791
|
+
| Autenticazione | OAuth WordPress.com (gestita da Claude Code) |
|
|
792
|
+
| Tool disponibili | ~15 |
|
|
793
|
+
|
|
794
|
+
**Quando serve**: Per siti ospitati su WordPress.com (non self-hosted).
|
|
795
|
+
|
|
796
|
+
---
|
|
797
|
+
|
|
798
|
+
## 11. Gestione Multi-Sito
|
|
799
|
+
|
|
800
|
+
### Configurazione
|
|
801
|
+
|
|
802
|
+
Aggiungi piu siti a `WP_SITES_CONFIG`:
|
|
803
|
+
|
|
804
|
+
```bash
|
|
805
|
+
export WP_SITES_CONFIG='[
|
|
806
|
+
{
|
|
807
|
+
"id": "opencactus",
|
|
808
|
+
"url": "https://opencactus.com",
|
|
809
|
+
"username": "admin@opencactus.com",
|
|
810
|
+
"password": "xxxx xxxx xxxx xxxx"
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
"id": "bioinagro",
|
|
814
|
+
"url": "https://bioinagro.com",
|
|
815
|
+
"username": "admin@bioinagro.com",
|
|
816
|
+
"password": "yyyy yyyy yyyy yyyy"
|
|
817
|
+
}
|
|
818
|
+
]'
|
|
819
|
+
export WP_DEFAULT_SITE="opencactus"
|
|
820
|
+
```
|
|
821
|
+
|
|
822
|
+
### Cambio Sito
|
|
823
|
+
|
|
824
|
+
```
|
|
825
|
+
"Passa al sito bioinagro"
|
|
826
|
+
"Switch to opencactus"
|
|
827
|
+
"Elenca i siti configurati"
|
|
828
|
+
```
|
|
829
|
+
|
|
830
|
+
Claude usa internamente `switch_site`, `list_sites` e `get_active_site` per gestire il cambio.
|
|
831
|
+
|
|
832
|
+
### Routing Automatico
|
|
833
|
+
|
|
834
|
+
Il wp-site-manager agent determina automaticamente quale set di tool usare:
|
|
835
|
+
|
|
836
|
+
| Tipo sito | Tool REST API | Tool Infrastruttura |
|
|
837
|
+
|-----------|--------------|---------------------|
|
|
838
|
+
| Self-hosted su Hostinger | WP REST Bridge | Hostinger MCP |
|
|
839
|
+
| Self-hosted altro | WP REST Bridge | (SSH via Bash) |
|
|
840
|
+
| WordPress.com hosted | WordPress.com MCP | WordPress.com MCP |
|
|
841
|
+
|
|
842
|
+
---
|
|
843
|
+
|
|
844
|
+
## 12. Scenari d'Uso Comuni
|
|
845
|
+
|
|
846
|
+
### Scenario 1: Check-up Mattutino del Sito
|
|
847
|
+
|
|
848
|
+
```
|
|
849
|
+
Tu: "Come sta opencactus oggi?"
|
|
850
|
+
|
|
851
|
+
Claude:
|
|
852
|
+
- Controlla raggiungibilita (HTTP 200)
|
|
853
|
+
- Verifica SSL (45 giorni rimanenti)
|
|
854
|
+
- Conta contenuti (15 post, 8 pagine)
|
|
855
|
+
- Elenca plugin attivi (12 attivi)
|
|
856
|
+
- Verifica Hostinger (API raggiungibile)
|
|
857
|
+
-> Report: tutto OK, nessun problema rilevato
|
|
858
|
+
```
|
|
859
|
+
|
|
860
|
+
### Scenario 2: Pubblicare un Articolo Ottimizzato SEO
|
|
861
|
+
|
|
862
|
+
```
|
|
863
|
+
Tu: "Scrivi e pubblica un articolo sulla bioeconomia del fico d'India in Sicilia"
|
|
864
|
+
|
|
865
|
+
Claude (attiva wp-content-strategist + skill wp-content):
|
|
866
|
+
1. Propone struttura (H1, H2, H3)
|
|
867
|
+
2. Scrive il contenuto con template blog standard
|
|
868
|
+
3. Ottimizza title tag e meta description
|
|
869
|
+
4. Suggerisce categorie e tag
|
|
870
|
+
5. Pubblica come bozza (draft)
|
|
871
|
+
6. Ti chiede conferma per pubblicare
|
|
872
|
+
```
|
|
873
|
+
|
|
874
|
+
### Scenario 3: Audit Completo Pre-Lancio
|
|
875
|
+
|
|
876
|
+
```
|
|
877
|
+
Tu: "/wordpress-manager:wp-audit full"
|
|
878
|
+
|
|
879
|
+
Claude (attiva security-auditor + performance-optimizer):
|
|
880
|
+
1. Fase sicurezza: scansiona plugin, utenti, SSL, DNS
|
|
881
|
+
2. Fase performance: analizza plugin pesanti, caching, media
|
|
882
|
+
3. Fase SEO: controlla sitemap, robots.txt, meta tag, struttura URL
|
|
883
|
+
-> Report unificato con severity, action plan, quick wins
|
|
884
|
+
```
|
|
885
|
+
|
|
886
|
+
### Scenario 4: Backup e Deploy Sicuro
|
|
887
|
+
|
|
888
|
+
```
|
|
889
|
+
Tu: "Devo aggiornare il tema. Fai un backup prima e poi deploya"
|
|
890
|
+
|
|
891
|
+
Claude (attiva deployment-engineer + skill wp-backup e wp-deploy):
|
|
892
|
+
1. Crea backup database via SSH (mysqldump)
|
|
893
|
+
2. Crea backup wp-content (tar)
|
|
894
|
+
3. Verifica integrita backup
|
|
895
|
+
4. Pre-flight check (sito raggiungibile, auth OK)
|
|
896
|
+
5. Deploy tema via Hostinger MCP
|
|
897
|
+
6. Verifica post-deploy
|
|
898
|
+
7. Conferma successo e mostra istruzioni rollback
|
|
899
|
+
```
|
|
900
|
+
|
|
901
|
+
### Scenario 5: Migrazione da Altro Hosting a Hostinger
|
|
902
|
+
|
|
903
|
+
```
|
|
904
|
+
Tu: "Migra il mio sito da SiteGround a Hostinger"
|
|
905
|
+
|
|
906
|
+
Claude (attiva skill wp-migrate):
|
|
907
|
+
1. Guida export database dal source (mysqldump via SSH)
|
|
908
|
+
2. Guida export file WordPress (tar via SSH)
|
|
909
|
+
3. Usa hosting_importWordpressWebsite su Hostinger
|
|
910
|
+
4. Esegue URL search-replace (wp-cli)
|
|
911
|
+
5. Verifica permessi file (755/644)
|
|
912
|
+
6. Guida aggiornamento DNS (A record -> nuovo IP)
|
|
913
|
+
7. Verifica SSL
|
|
914
|
+
```
|
|
915
|
+
|
|
916
|
+
### Scenario 6: Sviluppare un Blocco Gutenberg Custom
|
|
917
|
+
|
|
918
|
+
```
|
|
919
|
+
Tu: "Crea un blocco gallery per mostrare i prodotti con filtri per categoria"
|
|
920
|
+
|
|
921
|
+
Claude (attiva wordpress-router → wp-block-development):
|
|
922
|
+
1. Rileva il progetto (wp-project-triage → wp-block-plugin)
|
|
923
|
+
2. Crea la struttura: block.json, edit.js, save.js, style.scss
|
|
924
|
+
3. Configura attributi (columns, category, imageSize)
|
|
925
|
+
4. Implementa InspectorControls per le opzioni laterali
|
|
926
|
+
5. Implementa il render frontend con PHP
|
|
927
|
+
6. Testa in WordPress Playground (sandbox disposable)
|
|
928
|
+
7. Deploy quando pronto
|
|
929
|
+
```
|
|
930
|
+
|
|
931
|
+
### Scenario 7: Analisi Statica e Profiling
|
|
932
|
+
|
|
933
|
+
```
|
|
934
|
+
Tu: "Analizza il codice del mio plugin con PHPStan e controlla le performance"
|
|
935
|
+
|
|
936
|
+
Claude (attiva wp-phpstan + wp-performance):
|
|
937
|
+
1. Rileva configurazione PHPStan (phpstan.neon o crea baseline)
|
|
938
|
+
2. Esegue analisi statica a livello 6
|
|
939
|
+
3. Segnala errori tipizzazione, chiamate deprecate, pattern non sicuri
|
|
940
|
+
4. Profila con wp profile stage → identifica hook lenti
|
|
941
|
+
5. Verifica autoloaded options e object cache
|
|
942
|
+
6. Report con fix prioritizzati
|
|
943
|
+
```
|
|
944
|
+
|
|
945
|
+
---
|
|
946
|
+
|
|
947
|
+
## 13. Amministrazione Avanzata
|
|
948
|
+
|
|
949
|
+
### 13.1 Personalizzare gli Hook
|
|
950
|
+
|
|
951
|
+
Puoi modificare `hooks/hooks.json` per aggiungere o rimuovere hook. Struttura di un hook:
|
|
952
|
+
|
|
953
|
+
```json
|
|
954
|
+
{
|
|
955
|
+
"matcher": "nome_tool|altro_tool",
|
|
956
|
+
"hooks": [
|
|
957
|
+
{
|
|
958
|
+
"type": "prompt",
|
|
959
|
+
"prompt": "Messaggio di validazione per Claude"
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
"type": "command",
|
|
963
|
+
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/mio-script.sh",
|
|
964
|
+
"timeout": 15
|
|
965
|
+
}
|
|
966
|
+
]
|
|
967
|
+
}
|
|
968
|
+
```
|
|
969
|
+
|
|
970
|
+
**Tipi di hook**:
|
|
971
|
+
- `prompt`: Claude valuta semanticamente se l'operazione e legittima
|
|
972
|
+
- `command`: Uno script bash esegue validazione tecnica (exit 0 = allow, exit 2 = block)
|
|
973
|
+
|
|
974
|
+
### 13.2 Aggiungere un Nuovo Sito Manualmente
|
|
975
|
+
|
|
976
|
+
Se preferisci non usare `/wordpress-manager:wp-setup`:
|
|
977
|
+
|
|
978
|
+
1. Genera Application Password sul nuovo sito WordPress
|
|
979
|
+
2. Modifica `~/.claude/mcp-secrets.env`:
|
|
980
|
+
```bash
|
|
981
|
+
export WP_SITES_CONFIG='[
|
|
982
|
+
{"id":"sito1","url":"https://sito1.com","username":"admin","password":"xxxx"},
|
|
983
|
+
{"id":"nuovo-sito","url":"https://nuovo-sito.com","username":"admin","password":"yyyy"}
|
|
984
|
+
]'
|
|
985
|
+
```
|
|
986
|
+
3. Riavvia la sessione Claude Code (per ricaricare le variabili d'ambiente)
|
|
987
|
+
4. Verifica: `"Elenca i siti configurati"`
|
|
988
|
+
|
|
989
|
+
### 13.3 Script di Health Check Automatizzato
|
|
990
|
+
|
|
991
|
+
Puoi schedulare il health check con cron per monitoraggio proattivo:
|
|
992
|
+
|
|
993
|
+
```bash
|
|
994
|
+
# Aggiungi a crontab -e
|
|
995
|
+
# Health check ogni 6 ore, log su file
|
|
996
|
+
0 */6 * * * source ~/.claude/mcp-secrets.env && bash ~/.claude/plugins/local/wordpress-manager/scripts/health-check.sh >> /var/log/wp-health.log 2>&1
|
|
997
|
+
```
|
|
998
|
+
|
|
999
|
+
### 13.4 Aggiornare il Plugin
|
|
1000
|
+
|
|
1001
|
+
```bash
|
|
1002
|
+
cd ~/.claude/plugins/local/wordpress-manager
|
|
1003
|
+
git pull origin main
|
|
1004
|
+
|
|
1005
|
+
# Ricompila il server MCP se ci sono modifiche al TypeScript
|
|
1006
|
+
cd servers/wp-rest-bridge
|
|
1007
|
+
npm install
|
|
1008
|
+
npx tsc
|
|
1009
|
+
```
|
|
1010
|
+
|
|
1011
|
+
### 13.5 Disabilitare Temporaneamente il Plugin
|
|
1012
|
+
|
|
1013
|
+
In `~/.claude/settings.json`:
|
|
1014
|
+
|
|
1015
|
+
```json
|
|
1016
|
+
{
|
|
1017
|
+
"enabledPlugins": {
|
|
1018
|
+
"wordpress-manager@local": false
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
```
|
|
1022
|
+
|
|
1023
|
+
I server MCP non si avvieranno e i comandi non saranno disponibili fino alla riattivazione.
|
|
1024
|
+
|
|
1025
|
+
### 13.6 Sicurezza delle Credenziali
|
|
1026
|
+
|
|
1027
|
+
**Dove sono le credenziali**:
|
|
1028
|
+
- `~/.claude/mcp-secrets.env` - File locale, NON nel repository
|
|
1029
|
+
- Le variabili d'ambiente vengono iniettate da Claude Code al runtime
|
|
1030
|
+
|
|
1031
|
+
**Best practice**:
|
|
1032
|
+
- Non committare mai `mcp-secrets.env` in git
|
|
1033
|
+
- Ruota le Application Password periodicamente
|
|
1034
|
+
- Usa una Application Password dedicata per Claude (non la password dell'account)
|
|
1035
|
+
- Se un token viene compromesso, revocalo immediatamente dal pannello WordPress/Hostinger
|
|
1036
|
+
|
|
1037
|
+
### 13.7 Struttura dei Permessi File WordPress
|
|
1038
|
+
|
|
1039
|
+
Per riferimento, i permessi standard su Hostinger:
|
|
1040
|
+
|
|
1041
|
+
```
|
|
1042
|
+
Directory: 755 (rwxr-xr-x)
|
|
1043
|
+
File: 644 (rw-r--r--)
|
|
1044
|
+
wp-config.php: 440 (r--r-----)
|
|
1045
|
+
```
|
|
1046
|
+
|
|
1047
|
+
---
|
|
1048
|
+
|
|
1049
|
+
## 14. Troubleshooting
|
|
1050
|
+
|
|
1051
|
+
### Problemi di Connessione
|
|
1052
|
+
|
|
1053
|
+
**Problema**: "REST API non raggiungibile"
|
|
1054
|
+
|
|
1055
|
+
| Causa possibile | Soluzione |
|
|
1056
|
+
|-----------------|----------|
|
|
1057
|
+
| REST API disabilitata | Verifica in WordPress: Settings > Permalinks (re-salva) |
|
|
1058
|
+
| Plugin di sicurezza blocca API | Controlla Wordfence/Sucuri/iThemes - whitelist `/wp-json/` |
|
|
1059
|
+
| .htaccess corrotto | Verifica regole `.htaccess` per rewrite rules |
|
|
1060
|
+
| Permalink non configurati | Imposta su "Post name" in Settings > Permalinks |
|
|
1061
|
+
|
|
1062
|
+
**Problema**: "Autenticazione fallita (HTTP 401)"
|
|
1063
|
+
|
|
1064
|
+
| Causa possibile | Soluzione |
|
|
1065
|
+
|-----------------|----------|
|
|
1066
|
+
| Application Password errata | Rigenera da Users > Profile > Application Passwords |
|
|
1067
|
+
| Username errato | Usa l'email admin, non il display name |
|
|
1068
|
+
| Plugin blocca auth | Controlla plugin di sicurezza (2FA, IP whitelist) |
|
|
1069
|
+
| REST API Basic Auth non supportato | Installa plugin "Application Passwords" (incluso da WP 5.6) |
|
|
1070
|
+
|
|
1071
|
+
---
|
|
1072
|
+
|
|
1073
|
+
### Problemi Hostinger
|
|
1074
|
+
|
|
1075
|
+
**Problema**: "HTTP 530 - Site Frozen"
|
|
1076
|
+
|
|
1077
|
+
**Causa**: L'abbonamento Hostinger e scaduto o l'account e sospeso.
|
|
1078
|
+
|
|
1079
|
+
**Soluzione**:
|
|
1080
|
+
1. Accedi a [hostinger.com](https://www.hostinger.com)
|
|
1081
|
+
2. Controlla stato abbonamento in Billing
|
|
1082
|
+
3. Rinnova o riattiva il piano
|
|
1083
|
+
4. Rigenera API token se necessario
|
|
1084
|
+
|
|
1085
|
+
**Problema**: "HTTP 401 - Unauthorized" su Hostinger API
|
|
1086
|
+
|
|
1087
|
+
**Causa**: Token API scaduto o invalido.
|
|
1088
|
+
|
|
1089
|
+
**Soluzione**:
|
|
1090
|
+
1. Vai a [hostinger.com/my-api](https://www.hostinger.com/my-api)
|
|
1091
|
+
2. Genera un nuovo token
|
|
1092
|
+
3. Aggiorna `HOSTINGER_API_TOKEN` in `mcp-secrets.env`
|
|
1093
|
+
4. Riavvia la sessione Claude Code
|
|
1094
|
+
|
|
1095
|
+
---
|
|
1096
|
+
|
|
1097
|
+
### Problemi del Server MCP
|
|
1098
|
+
|
|
1099
|
+
**Problema**: "WP REST Bridge non si avvia"
|
|
1100
|
+
|
|
1101
|
+
```bash
|
|
1102
|
+
# Verifica build
|
|
1103
|
+
ls ~/.claude/plugins/local/wordpress-manager/servers/wp-rest-bridge/build/server.js
|
|
1104
|
+
|
|
1105
|
+
# Se manca, ricompila
|
|
1106
|
+
cd ~/.claude/plugins/local/wordpress-manager/servers/wp-rest-bridge
|
|
1107
|
+
npm install && npx tsc
|
|
1108
|
+
|
|
1109
|
+
# Verifica env vars
|
|
1110
|
+
echo $WP_SITES_CONFIG | python3 -m json.tool
|
|
1111
|
+
```
|
|
1112
|
+
|
|
1113
|
+
**Problema**: "Tool non disponibili nella sessione Claude Code"
|
|
1114
|
+
|
|
1115
|
+
| Causa | Soluzione |
|
|
1116
|
+
|-------|----------|
|
|
1117
|
+
| Plugin non abilitato | Verifica `"wordpress-manager@local": true` in settings.json |
|
|
1118
|
+
| Server MCP non compilato | Esegui `npx tsc` in `servers/wp-rest-bridge/` |
|
|
1119
|
+
| Variabili d'ambiente mancanti | Esegui `source ~/.claude/mcp-secrets.env` prima di avviare Claude |
|
|
1120
|
+
| Sessione stale | Riavvia Claude Code per ricaricare i plugin |
|
|
1121
|
+
|
|
1122
|
+
---
|
|
1123
|
+
|
|
1124
|
+
### Problemi Post-Deploy
|
|
1125
|
+
|
|
1126
|
+
**Problema**: "Schermo bianco dopo deploy" (White Screen of Death)
|
|
1127
|
+
|
|
1128
|
+
1. Controlla `wp-content/debug.log` (se `WP_DEBUG` e attivo)
|
|
1129
|
+
2. Causa comune: conflitto plugin -> rinomina la cartella del plugin appena deployato
|
|
1130
|
+
3. Se tema: attiva un tema default (Twenty Twenty-Four) da database o WP-CLI
|
|
1131
|
+
|
|
1132
|
+
**Problema**: "URL sbagliati dopo migrazione"
|
|
1133
|
+
|
|
1134
|
+
1. Esegui search-replace con WP-CLI: `wp search-replace 'vecchio.com' 'nuovo.com' --all-tables`
|
|
1135
|
+
2. Svuota tutte le cache (page cache, object cache, CDN)
|
|
1136
|
+
3. Verifica `.htaccess` per regole corrette
|
|
1137
|
+
|
|
1138
|
+
---
|
|
1139
|
+
|
|
1140
|
+
### Diagnostica Rapida
|
|
1141
|
+
|
|
1142
|
+
Esegui il health check per una panoramica immediata:
|
|
1143
|
+
|
|
1144
|
+
```bash
|
|
1145
|
+
source ~/.claude/mcp-secrets.env
|
|
1146
|
+
bash ~/.claude/plugins/local/wordpress-manager/scripts/health-check.sh
|
|
1147
|
+
```
|
|
1148
|
+
|
|
1149
|
+
Per validazione pre-operazione:
|
|
1150
|
+
|
|
1151
|
+
```bash
|
|
1152
|
+
source ~/.claude/mcp-secrets.env
|
|
1153
|
+
bash ~/.claude/plugins/local/wordpress-manager/scripts/validate-wp-operation.sh deploy
|
|
1154
|
+
```
|
|
1155
|
+
|
|
1156
|
+
---
|
|
1157
|
+
|
|
1158
|
+
## 15. Glossario
|
|
1159
|
+
|
|
1160
|
+
| Termine | Definizione |
|
|
1161
|
+
|---------|------------|
|
|
1162
|
+
| **Application Password** | Password dedicata per accesso API, generata da WordPress (non e la password dell'account) |
|
|
1163
|
+
| **Claude Code** | CLI ufficiale di Anthropic per interazione con Claude da terminale |
|
|
1164
|
+
| **CWV (Core Web Vitals)** | Metriche Google per UX: LCP, INP, CLS |
|
|
1165
|
+
| **Hook** | Guardiano che intercetta operazioni pericolose per chiedere conferma |
|
|
1166
|
+
| **Hostinger MCP** | Server MCP che espone le API Hostinger come tool per Claude |
|
|
1167
|
+
| **MCP** | Model Context Protocol - protocollo di comunicazione tra Claude e servizi esterni |
|
|
1168
|
+
| **Plugin (Claude Code)** | Estensione che aggiunge agents, skills, commands e tool a Claude Code |
|
|
1169
|
+
| **Plugin (WordPress)** | Estensione che aggiunge funzionalita a WordPress |
|
|
1170
|
+
| **PreToolUse** | Evento hook che si attiva prima dell'esecuzione di un tool |
|
|
1171
|
+
| **REST API** | Interfaccia HTTP di WordPress per gestione programmatica (wp-json/wp/v2/) |
|
|
1172
|
+
| **Skill** | Libreria di conoscenza specializzata che Claude attiva automaticamente |
|
|
1173
|
+
| **stdio** | Standard Input/Output - trasporto usato dai server MCP per comunicare con Claude |
|
|
1174
|
+
| **WP REST Bridge** | Server MCP custom che traduce tool call Claude in chiamate WordPress REST API |
|
|
1175
|
+
| **WP_SITES_CONFIG** | Variabile d'ambiente JSON con credenziali dei siti WordPress configurati |
|
|
1176
|
+
| **Block Theme** | Tema WordPress basato su template HTML e theme.json (Full Site Editing) |
|
|
1177
|
+
| **block.json** | Manifest di un blocco Gutenberg: nome, attributi, script, stili |
|
|
1178
|
+
| **Blueprint** | File JSON che descrive la configurazione di un'istanza WordPress Playground |
|
|
1179
|
+
| **Gutenberg** | Editor a blocchi di WordPress, progetto open-source per Full Site Editing |
|
|
1180
|
+
| **Interactivity API** | API WordPress per interattivita lato client con direttive `data-wp-*` |
|
|
1181
|
+
| **PHPStan** | Tool di analisi statica per PHP; la skill wp-phpstan lo configura per WordPress |
|
|
1182
|
+
| **theme.json** | File di configurazione centrale per temi a blocchi (colori, font, layout, spacing) |
|
|
1183
|
+
| **WordPress Playground** | Ambiente WordPress disposable che gira in WebAssembly con SQLite |
|
|
1184
|
+
| **WPDS** | WordPress Design System — componenti UI, token di design e pattern per l'ecosistema WP |
|
|
1185
|
+
| **WP-CLI** | Command-line interface per WordPress: gestione plugin, utenti, database da terminale |
|
|
1186
|
+
|
|
1187
|
+
---
|
|
1188
|
+
|
|
1189
|
+
*Guida v1.4.0 - WordPress Manager Plugin per Claude Code*
|
|
1190
|
+
*Ultimo aggiornamento: 2026-02-27*
|