| name | reindex |
| description | Trigger reindexing of a specific WordPress extension. Use to rebuild the search index for a plugin, theme, or core version. |
| disable-model-invocation | true |
| argument-hint | repo slug |
Reindex Extension
Trigger reindexing of a specific WordPress plugin, theme, or core version.
Usage
/reindex plugins akismet - Reindex the Akismet plugin
/reindex themes flavor - Reindex the flavor theme
/reindex cores 6.7.1 - Reindex WordPress core 6.7.1
Steps
-
Parse arguments
$REPO: Repository type (plugins, themes, or cores)
$SLUG: Extension slug (or version for cores)
- Both are required
-
Ensure binary is current
go install ./...
-
Check if the server is running
curl -s http://localhost:8585/up 2>&1
-
If server is running, trigger reindex via API:
curl -s -X POST "http://localhost:8585/api/reindex/$REPO/$SLUG" 2>&1
-
If server is not running, use the index CLI directly:
-
Report results
## Reindex Results
- Extension: $REPO/$SLUG
- Method: API / CLI
- Status: success / failed
- Details: [output from command]
CLI vs API
| Method | When | Notes |
|---|
API (/api/reindex) | Server running | Handles zip URL lookup, DB update, and hot-swap |
CLI (veloria index) | Server not running | Requires explicit --zipurl, no DB update |
The API method is preferred as it handles the full pipeline including database updates and live index hot-swap.