Skip to content

Installing WP-CLI manually

WP‑CLI (WordPress Command Line Interface) is a powerful tool that lets you manage WordPress directly from the command line. On ruachost.com, WP‑CLI is preinstalled on most hosting packages, but if it’s not available, you can install it manually.

  • Manage WordPress without logging into the dashboard.
  • Run updates, install plugins/themes, and manage users via commands.
  • Automate repetitive tasks.
  • Faster than using the WordPress admin interface.
  1. Log in to your hosting account via SSH.

    • Use your terminal or SSH client to connect.
  2. Download WP‑CLI Phar file. Run the following commands:

    Terminal window
    cd ~
    curl -k -L https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar > wp-cli.phar
  3. Verify installation. Run:

    Terminal window
    php wp-cli.phar --info

    ✅ If successful, you’ll see PHP version and configuration details. ⚠️ If not, you may need to install additional dependencies (like Phar support).

  4. Create an alias for WP‑CLI. Replace username with your hosting account username:

    echo 'alias wp="php /home/username/wp-cli.phar"' >> ~/.bashrc
  5. *Reload your shell configuration.*

    Terminal window
    source ~/.bashrc
  6. Test WP‑CLI. Run:

    Terminal window
    wp --info

    ✅ WP‑CLI is now ready to use.

  • WP‑CLI is already installed on most ruachost.com shared and reseller hosting packages.
  • Manual installation is only needed for unmanaged servers or custom setups.
  • Always keep backups before running WP‑CLI commands that modify your site.