SearchWP

SearchWP & WP-CLI

Table of Contents

SearchWP has built-in support for a number of WP-CLI commands.

Commands

wp searchwp index [--site=<all|ids>] [--rebuild]
Build (or rebuild) the SearchWP index
wp searchwp reindex <id>... [--source=<source>]
Reindex entries
wp searchwp diagnose <tokens|status> [--source=<source>]
Diagnose information about SearchWP’s index

Examples

Trigger the indexer
wp searchwp index
Rebuild the index
wp searchwp index --rebuild
Reindex WP_Post 114
wp searchwp reindex 114
Reindex WP_Posts 88 and 314
wp searchwp reindex 88 314
Reindex all WP_Posts of Page post type
wp searchwp reindex $(wp post list --post_type=page --format=ids)
Reindex WP_User 2
wp searchwp reindex 2 --source=User
Retrieve tokens for WP_Post 19
wp searchwp diagnose tokens 19
Retrieve index status for WP_User 7
wp searchwp diagnose status 7 --source=User
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]
[wpforms id="3080"]