Install wp-cli on your server
step 1 :
Download file :
[user@server]$ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
Step 2 :
check if the file works
[user@server]$ php wp-cli.phar -info ( or php wp-cli.phar -info --allow-root)
To use WP-CLI from the command line by typing wp, make the file executable and move it to somewhere in your PATH. For example:
/chmod +x wp-cli.phar
/sudo mv wp-cli.phar /usr/local/bin/wp
- note : --allow-root : If you are using it as root user on your server
Check which version you are using :
[user@server]$ wp core version (or php wp-cli.phar core version --allow-root )
Update WordPress Core :
[user@server]$ wp core update (or php wp-cli.phar core update --allow-root )
Overview Cli wp commands :