Database_Command
Database management commands for Better Search.
Namespace: WebberZone\Better_Search\Pro\CLI
Since: 4.3.0
Source: includes/cli/class-database-command.php line 25
Extends: Base_Command
Methods
status()
Show database status and migration information.
OPTIONS
[—format=
[—network] : Show status for all sites in the network.
[—blog-id=
EXAMPLES
wp bsearch db status
wp bsearch db status --format=json
wp bsearch db status --network
Line: 50
public function status( array $args, array $assoc_args ): void;
| Type | Name | Description |
|---|---|---|
array | $args | Command arguments. |
array | $assoc_args | Command associative arguments. |
Returns: void
create_tables()
Create Better Search tracking tables.
OPTIONS
[—dry-run] : Show what would be created without making changes.
[—force] : Force table creation even if tables exist.
EXAMPLES
wp bsearch db create-tables wp bsearch db create-tables —dry-run
Line: 140
public function create_tables( array $args, array $assoc_args ): void;
| Type | Name | Description |
|---|---|---|
array | $args | Command arguments. |
array | $assoc_args | Command associative arguments. |
Returns: void
recreate_tables()
Recreate Better Search tracking tables with backup.
OPTIONS
[—backup] : Create backup tables before recreating. Default: true.
[—force] : Force recreation without confirmation.
[—dry-run] : Show what would be done without making changes.
EXAMPLES
wp bsearch db recreate-tables
wp bsearch db recreate-tables --no-backup
wp bsearch db recreate-tables --dry-run
Line: 202
public function recreate_tables( array $args, array $assoc_args ): void;
| Type | Name | Description |
|---|---|---|
array | $args | Command arguments. |
array | $assoc_args | Command associative arguments. |
Returns: void
indexes()
Manage FULLTEXT indexes and fuzzy stored functions.
EXAMPLES
wp bsearch db indexes status
wp bsearch db indexes create
wp bsearch db indexes delete --force
wp bsearch db indexes recreate
Line: 250
public function indexes( array $args, array $assoc_args ): void;
| Type | Name | Description |
|---|---|---|
array | $args | Command arguments. |
array | $assoc_args | Command associative arguments. |
Returns: void