Recent

Tables_Command class Pro only

Tables_Command

Custom tables management commands for CRP.

Namespace: WebberZone\Contextual_Related_Posts\Pro\CLI
Since: 4.2.0
Source: includes/cli/class-tables-command.php line 24 Extends: Base_Command

Methods

__construct()

Constructor.

Since: 4.2.0
Line: 65

public function __construct(  );

create()

Create custom tables for ECSI.

OPTIONS

[—force] : Force table creation even if tables already exist.

[—dry-run] : Show what would be created without making changes.

EXAMPLES

wp crp tables create
wp crp tables create --force

Line: 89

public function create( array $args, array $assoc_args ): void;
TypeNameDescription
array$argsCommand arguments.
array$assoc_argsCommand associative arguments.

Returns: void

drop()

Drop custom tables.

OPTIONS

[—force] : Force table deletion without confirmation.

[—dry-run] : Show what would be dropped without making changes.

EXAMPLES

wp crp tables drop --force

Line: 132

public function drop( array $args, array $assoc_args ): void;
TypeNameDescription
array$args
array$assoc_args

Returns: void

status()

Show custom tables status.

OPTIONS

[—network] : Show status for all sites in a multisite network.

[—format=] : Output format. Options: table, json, csv, yaml. Default: table.

EXAMPLES

wp crp tables status
wp crp tables status --network
wp crp tables status --format=json

Line: 189

public function status( array $args, array $assoc_args ): void;
TypeNameDescription
array$argsCommand arguments.
array$assoc_argsCommand associative arguments.

Returns: void

recreate()

Drop and recreate custom tables from scratch.

All indexed data will be permanently lost. Run wp crp tables index afterwards to repopulate the tables.

OPTIONS

[—force] : Skip confirmation prompt.

[—dry-run] : Show what would be done without making changes.

EXAMPLES

wp crp tables recreate --force

Since: 4.2.4
Line: 305

public function recreate( array $args, array $assoc_args ): void;
TypeNameDescription
array$args
array$assoc_args

Returns: void

convert_innodb()

Convert the custom table storage engine to InnoDB.

FULLTEXT indexes are automatically regenerated after conversion. This operation may take some time on large tables.

OPTIONS

[—force] : Skip confirmation prompt.

[—dry-run] : Show what would be done without making changes.

EXAMPLES

wp crp tables convert-innodb
wp crp tables convert-innodb --force

Since: 4.2.4
Line: 357

public function convert_innodb( array $args, array $assoc_args ): void;
TypeNameDescription
array$args
array$assoc_args

Returns: void

index()

Index posts into custom tables.

OPTIONS

[—batch-size=] : Batch size for processing. Default: 50.

[—network] : Index posts on all sites in the network.

[—blog-id=] : Specific blog ID to index posts for (multisite only).

[—force] : Force override existing lock file.

[—dry-run] : Show what would be indexed without making changes.

[—verbose] : Show detailed output.

EXAMPLES

wp crp tables index
wp crp tables index --network
wp crp tables index --dry-run

Line: 426

public function index( array $args, array $assoc_args ): void;
TypeNameDescription
array$argsCommand arguments.
array$assoc_argsCommand associative arguments.

Returns: void