Sunday, 19 November 2017

Set Up Wordpress CLI Tool On Centos 7 RHEL

Wordpress CLI tool is very useful for performing many tasks associated with Wordpress development and administration. its easily installed and configured if your system meets the minimum requirements.

So make sure your system meets the minimum requirements before installing it.

UNIX-like environment (OS X, Linux, FreeBSD, Cygwin)

PHP 5.3.29 or later

WordPress 3.7 or later

Once you've established these, download the wp-cli.phar file using curl or wget.

$ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

Check it with the following command.

$  php wp-cli.phar --info

Make it executable and move it into your path so you can use the wp command.

$ chmod +x wp-cli.phar

$ sudo mv wp-cli.phar /usr/local/bin/wp

Run a command to check its installed properly

$  wp --info

PHP binary:    /usr/bin/php
PHP version:    7.0.25
php.ini used:    /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/anton
WP-CLI packages dir:   
WP-CLI global config:   
WP-CLI project config:   
WP-CLI version:    1.4.1





Check out the quick start guide at https://make.wordpress.org/cli/handbook/quick-start/

to get started with it.

That's it!, you can now use the wp-cli tools for many tasks associated with Wordpress.