Use of wp-cli

It should be installed locally (where here I assume it is on a linux machine or the machine has a bash shell) followings the instructions at wp-cli.org to defien a command wp.

Generate a key pair and install public key on machine with WordPress installation.

Define an alias such as:

alias wp='wp --ssh=stevefis@uk41.siteground.eu:18765 --path=public_html/club2'

Where:

  • the ssh parameter includes your username, the siteground host and its .ssh port which is always 18765.
  • the path parameter points to the WordPress installation of interest

Then use commands such as:

wp –info

wp –help to show all commands

wp post –help to show information about all commands

wp post list –post_type=page¬†to list all pages