How to move back a command in WP-CLI from wp shell? July 20, 2022 by Tarik Billa From wp-cli.org: Type “exit” to close session. Alternatively you can try hitting Ctrl+C or Cmd+C for Mac I think.