WP-CLI auf der Kommandozeile

Quelle: https://wp-cli.org/

Installation

Download

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

Versionskontrolle

php wp-cli.phar --info

Ausführbar machen

chmod +x wp-cli.phar

verschieben, sodass es als system wide binary verfügbar ist"

sudo mv wp-cli.phar /usr/local/bin/wp

Danach im jeweiligen WP root Directory starten

sudo -u www-data wp

Hilfe

sudo -u www-data wp help

Core Update einer WP Installation

sudo -u www-data wp core update
root@app6:/var/www/netzwissen.de# sudo -u www-data wp core update
PHP Warning: Undefined array key "HTTP_X_FORWARDED_PROTO" in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1277) : eval()'d code on line 120
Updating to version 6.3.1 (de_DE)...
Herunterladen der Aktualisierung von https://downloads.wordpress.org/release/de_DE/wordpress-6.3.1.zip ...
Entpacken der aktualisierten Version ...
Success: WordPress updated successfully.

User Management

<font inherit/monospace;;inherit;;#000000background-color:#ffffff;>wp user add-cap <user> <cap></font> or: wp user add-role <user> <role>
or: wp user application-password <command>
or: wp user check-password <user> <user_pass> [--escape-chars]
or: wp user create <user-login> <user-email> [--role=<role>] [--user_pass=<password>] [--user_registered=<yyyy-mm-dd-hh-ii-ss>] [--display_name=<name>]
[--user_nicename=<nice_name>] [--user_url=<url>] [--nickname=<nickname>] [--first_name=<first_name>] [--last_name=<last_name>] [--description=<description>
] [--rich_editing=<rich_editing>] [--send-email] [--porcelain]
or: wp user delete <user>... [--network] [--reassign=<user-id>] [--yes]
or: wp user generate [--count=<number>] [--role=<role>] [--format=<format>]
or: wp user get <user> [--field=<field>] [--fields=<fields>] [--format=<format>]
or: wp user import-csv <file> [--send-email] [--skip-update]
or: wp user list [--role=<role>] [--<field>=<value>] [--network] [--field=<field>] [--fields=<fields>] [--format=<format>]
or: wp user list-caps <user> [--format=<format>]
or: wp user meta <command>
or: wp user remove-cap <user> <cap>
or: wp user remove-role <user> [<role>]
or: wp user reset-password <user>... [--skip-email] [--show-password] [--porcelain]
or: wp user session <command>
or: wp user set-role <user> [<role>]