Management from the SSH WordPress WP- CLI Installation
Below a very simple and fast way through which you install the WP-CLI on the server.
What is WP-CLI?
WP-CLI is a simple tool, which allows you to operate on a script WordPress using the command line in Terminal (SSH). With it, you can install script WordPress, update files, install / uninstall plugins / themes, display information about the version of HR, or even regenerate broken icon files, media (pictures) even going to the database optimization.
Installation
If you do not have it in the system Curl install it:
Debian/ Ubuntu:
1 | apt-get install curl |
Centos
1 | yum install curl |
We charge a soft command:
1 | curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar |
The next step is to validate files:
1 | php wp-cli.phar --info |
We give chmod and transfer files:
1 2 | chmod +x wp-cli.phar sudo mv wp-cli.phar /usr/local/bin/wp |
We verify the correct command:
1 | wp --info |
We should get a result similar to the one below:
1 2 3 4 5 6 7 8 9 10 11 12 13 | wp --info OS: Linux 2.6.32-openvz-042stab123.1-amd64 #1 SMP Wed Mar 22 15:22:33 MSK 2017 x86_64 Shell: PHP binary: /usr/local/bin/php PHP version: 5.6.34 php.ini used: /usr/local/lib/php.ini WP-CLI root dir: phar://wp-cli.phar WP-CLI vendor dir: phar://wp-cli.phar/vendor WP_CLI phar path: /home/admin/domains WP-CLI packages dir: WP-CLI global config: WP-CLI project config: WP-CLI version: 1.5.1 |
That's all the soft we have installed 😉
In the next tutorial I will describe how to use the wp-cli. Install quickly wordpress, plug-in installation or its activation.