Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
curl -O https://raw.githubusercontent.com/wp...ar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
 

If you are using CageFS, you will need the below steps:

 


Code Block
languagebash
echo -en '[WP-Cli]\ncomment=Allow WP-CLI to work on the server\npaths=/usr/local/bin/wp\n' > /etc/cagefs/conf.d/wpcli.cfg
cagefsctl --update

...



Once the above steps have finished without any errors, the command line can be accessed by typing wp in your directory that WordPress is installed to.


Installing and activating plugins via WP-CLI


 

Code Block
languagebash
$wp plugin install rest-api --activate   #install and activate the plugin test-api
Installing WordPress REST API (Version 2) (2.0-beta13)
Downloading install package from https://downloads.wordpress.org/plugin/rest-api.2.0-beta13.zip...
Unpacking the package...
Installing the plugin...
Plugin installed successfully.
Activating 'rest-api'...
Success: Plugin 'rest-api' activated.
 


Below are some commonly used commands:

...


Code Block
languagebash
# Install the development version from wordpress.org
$ wp plugin install bbpress --version=dev

# Install from a local zip file
$ wp plugin install path_to_the_plugin.zip

# Install from a remote zip file
$ wp plugin install remote_path

#List all installed plugins
$ wp plugin list 

#Getting help of any command
$ wp help cli/plugin



...

Content by Label
showLabelsfalse
max10
spacesGKB
showSpacefalse
sortmodified
reversetrue
titleMore WordPress
typepage
excludeCurrenttrue
cqllabel = "wordpress" and type = "page" and space = "GKB"
labelsplayer logo PHPMotion image