# Installing WP-CLI manually

> Install WP-CLI yourself over SSH if it is not already available, so you can manage WordPress from the command line.

Source: https://helpcenter.ruachost.com/wordpress/guides/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.

## Why Use WP‑CLI?

- 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.

## Steps to Install WP‑CLI Manually

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:

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

   ```bash
   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.\**

   ```bash
   source ~/.bashrc
   ```
6. **Test WP‑CLI.** Run:

   ```bash
   wp --info
   ```

   ✅ WP‑CLI is now ready to use.

## Important Notes

- WP‑CLI is already installed on most **ruachost.com** shared 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.
