2.14.1.2.4. WP-CLI utility

The WP-CLI utility is available on the hosting by default.

WP-CLI — the official console utility for working with a site on WordPress.

Syntax:

wp <command>

A list of commands is available in the official documentation.

View information about the utility:

wp --info

The result should be something like this:

OS:     Linux 4.18.0-425.10.1.lve.el8.x86_64 #1 SMP Wed Jan 25 12:10:58 EST 2023 x86_64
Shell:  /bin/bash
PHP binary:     /usr/local/php82/bin/php
PHP version:    8.2.7
php.ini used:   /usr/local/php82/etc/php.ini
MySQL binary:   /usr/bin/mysql
MySQL version:  mysql  Ver 14.14 Distrib 5.7.42-46, for Linux (x86_64) using  7.0
SQL modes:
WP-CLI root dir:        phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:      phar://wp-cli.phar/vendor
WP_CLI phar path:       /home/example
WP-CLI packages dir:
WP-CLI cache dir:       /home/example/.wp-cli/cache
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.8.1
Змест

    (4)