SearchWP Documentation

View the installation guide, browse the Knowledge Base, find out about SearchWP’s many hooks

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 diagnostics <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 diagnostics tokens 19
Retrieve index status for WP_User 7
wp searchwp diagnostics status 7 --source=User

Create a Better WordPress Search Experience Today

Never lose visitors to unhelpful search results again. SearchWP makes creating your own smart WordPress search fast and easy.

Get SearchWP Now
Multiple Search Engines Icon