To install wp-cli you must first enable ssh access. Below you will find a guide on how to do this: Enable SSH access yourself.
IMPORTANT: ssh access works for all accounts. To access ssh on the test account, please contact us at hosting@smarthost.eu
Then, on Windows, log in to ssh using a client, e.g. PUTTY, it is free and you can download it from the website: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
Linux users can login using the terminal using the command below:
ssh -p 5739 login@custromer-name.smarthost.eu
We install and run the program. In the first field, enter our cPanel login, then @, then the name of our account at Smarthost.pl. In the second field, we enter port 5739.
First, make sure you are in the default directory, e.g. /home/customerlogin, using the pwd command
Then download wp-cli with the wget command:
wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
php56-cli
php70-cli
php71-cli
php72-cli
mcedit .bashrc
For PHP 5.6
alias wp=’/opt/cpanel/ea-php56/root/usr/bin/php /home/loginklienta/wp-cli.phar’
For PHP 7.1
alias wp=’/opt/cpanel/ea-php71/root/usr/bin/php /home/loginklienta/wp-cli.phar’
For PHP 7.2
alias wp=’/opt/cpanel/ea-php72/root/usr/bin/php /home/loginklienta/wp-cli.phar’
. .bashrc
After all these steps have been taken, we can test wp-cli with the command below.
wp –info
OS: Linux 3.10.0-714.10.2.lve1.4.75.el7.x86_64 #1 SMP Fri Nov 3 04:25:16 EDT 2017 x86_64
Shell: /bin/bash
PHP binary: /opt/cpanel/ea-php72/root/usr/bin/php
PHP version: 7.2.3
php.ini used: /opt/cpanel/ea-php72/root/etc/php.ini
WP-CLI root dir: phar://wp-cli.phar
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: /home/bartlomiej
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 1.5.0
Speed and performance: full SSD, http/2, multiple cache methods, free data migration, free SSL certificates
Security and performance: full separation, anti-exploit technology, full SSD, http/2, free SSL certificates
Several hundred types of domains from all around the world can be registered at Smarthost.au. Our prices are affordable for everyone.