Thank you.
Is it the official way to install WP-CLI?
$ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
$ chmod +x wp-cli.phar
$ sudo mv wp-cli.phar /usr/local/bin/wp
$ wp core download
$ wp core install
$ wp core check-update
Thank you so much.
I got below error:
# php wp-cli.phar --info
PHP: syntax error, unexpected '(' in /etc/php.ini on line 1678
OS: Linux 4.18.0-193.14.2.el8_2.x86_64 #1 SMP Sun Jul 26 03:54:29 UTC 2020 x86_64
Shell: /bin/bash
PHP binary: /usr/bin/php
PHP version: 7.2.24
php.ini used: /etc/php.ini
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/jason
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.4.0
And PHP.ini file on line 1678:
; Local Variables:
; tab-width: 4
; End:
; X-XSS-Protection
header("X-XSS-Protection: 1; mode=block");
What is my problem?
You’ll need to contact your hosting provider’s support about this, we can only assist with the WordPress end of things.
Thank you.
I solved that error.
I have a question. My WordPress website is under “/var/www/wp” directory. I did below command:
# /usr/local/bin/wp core update
Error: This does not seem to be a WordPress installation.
Pass --path=<code>path/to/wordpress</code> or run <code>wp core download</code>.
And I know that I must define “–path=/var/www/wp” parameter. Use WP-CLI for update my WordPress website is same as click on update button in WordPress panel?
My WordPress website is under “/var/www/wp” directory.
I believe the command should then be:
/var/www/wp core update
Use WP-CLI for update my WordPress website is same as click on update button in WordPress panel?
Yes.