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?
Section titled “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
Section titled “Steps to Install WP‑CLI Manually”-
Log in to your hosting account via SSH.
- Use your terminal or SSH client to connect.
-
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 -
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).
-
Create an alias for WP‑CLI. Replace
usernamewith your hosting account username:echo 'alias wp="php /home/username/wp-cli.phar"' >> ~/.bashrc -
*Reload your shell configuration.*
Terminal window source ~/.bashrc -
Test WP‑CLI. Run:
Terminal window wp --info✅ WP‑CLI is now ready to use.
Important Notes
Section titled “Important Notes”- 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.