Title: Update from CLI
Last modified: November 5, 2020

---

# Update from CLI

 *  [hack3rcon](https://wordpress.org/support/users/hack3rcon/)
 * (@hack3rcon)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/update-from-cli/)
 * Hello,
    Is it possible to update WordPress by CLI?
 * Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/update-from-cli/#post-13627624)
 * Yes: [https://developer.wordpress.org/cli/commands/core/update/](https://developer.wordpress.org/cli/commands/core/update/)
 *  Thread Starter [hack3rcon](https://wordpress.org/support/users/hack3rcon/)
 * (@hack3rcon)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/update-from-cli/#post-13630953)
 * 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
       ```
   
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/update-from-cli/#post-13631049)
 * Please follow the steps at [https://wp-cli.org/#installing](https://wp-cli.org/#installing)
 *  Thread Starter [hack3rcon](https://wordpress.org/support/users/hack3rcon/)
 * (@hack3rcon)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/update-from-cli/#post-13635453)
 * 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?
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/update-from-cli/#post-13636104)
 * You’ll need to contact your hosting provider’s support about this, we can only
   assist with the WordPress end of things.
 *  Thread Starter [hack3rcon](https://wordpress.org/support/users/hack3rcon/)
 * (@hack3rcon)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/update-from-cli/#post-13639218)
 * 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?
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/update-from-cli/#post-13640595)
 * > 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.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Update from CLI’ is closed to new replies.

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 7 replies
 * 2 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/update-from-cli/#post-13640595)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
