How to install WP-CLI?


  • Applies to: Grid
    • Difficulty: N/A
    • Time Needed: N/A
    • Tools Required: Pre-installed
  • Applies to: DV
    • Difficulty: Easy
    • Time Needed: 5
    • Tools Required: SSH Access
  • Applies to: Shared Hosting
    • Difficulty: N/A
    • Time Needed: N/A
    • Tools Required: Pre-installed
  • Applies to: Managed WordPress Hosting
    • Difficulty: N/A
    • Time Needed: N/A
    • Tools Required: Pre-installed

Overview

WP-CLI is an open-source suite of command-line tools for managing and administering WordPress. Most functions that can be done in the WordPress Dashboard via a web browser can be completed by typing a command at a prompt.

For the GridManaged WordPressShared Hosting, wp-cli comes pre-installed! Simply connect to your server using SSH SSH SSH SSH to start using it. For information on how to use the various wp-cli commands feel free to check out the documentation below:

Overview

WP-CLI is an open-source suite of command-line tools for managing and administering WordPress. Most functions that can be done in the WordPress Dashboard via a web browser can be completed by typing a command at a prompt.

To utilize this feature, DV/VPS servers will require WP-CLI to be installed. This can be done with just a few simple commands in SSH.

Instructions

  1. Connect to your server through SSH.
  2. Download wp-cli by running the following command:
    curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
  3. Make wp-cli executable by running:
    chmod +x wp-cli.phar
  4. This next command will allow us to easily use wp-cli by typing "wp":
    sudo mv wp-cli.phar /usr/local/bin/wp
  5. That's it! WP-CLI should now be installed.
    • To check/update your wp-cli version in the future, you can run:
      wp cli update

Resources