If you're still clicking through wp-admin to update plugins one at a time, or writing raw SQL to fix a URL after a migration, WP-CLI will save you a stupid amount of time. It's the command-line tool for WordPress, and once it's set up on your Getwebup account, most routine maintenance takes seconds instead of minutes.
What WP-CLI Actually Is
WP-CLI is a command-line interface for WordPress. Instead of logging into wp-admin, clicking around, and waiting for pages to load, you run a single command from the terminal: update core, update every plugin, search-replace a domain across the whole database, reset a locked-out admin's password, export the database — all without a browser.
It's the same tool developers use to script deployments and staging refreshes. You don't need to be a developer to use it. You just need terminal access and a handful of commands you'll reuse constantly.
Getting Access: cPanel Terminal or SSH
You have two ways in, depending on your plan:
- Shared/cPanel hosting — use cPanel's built-in Terminal app (search "Terminal" in cPanel). It runs in a jailed shell but supports WP-CLI fine.
- VPS — SSH in as usual:
ssh user@your-server-ip.
Once you're in, cd into the WordPress install directory — usually public_html or public_html/yourdomain.com for addon domains:
cd ~/public_htmlChecking If It's Already Installed
Most Getwebup cPanel and VPS environments ship with WP-CLI preinstalled. Check first:
wp --infoIf you see version info and PHP details, you're set — skip to the commands section. If you get -bash: wp: command not found, install it manually below.
Installing WP-CLI (If It's Missing)
This takes under a minute on both cPanel Terminal and a VPS:
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
mv wp-cli.phar ~/bin/wp # or wherever's in your PATH
wp --infoOn a VPS where you have root, you can install it system-wide instead so every account can use it:
sudo mv wp-cli.phar /usr/local/bin/wpOn shared cPanel hosting you're jailed to your own home directory, so ~/bin (added to your PATH in .bashrc) is the right spot.
The Commands You'll Actually Use
You don't need to memorize the full command reference. In practice, 90% of the work is these:
| Task | Command |
|---|---|
| Update WordPress core | wp core update |
| Update all plugins | wp plugin update --all |
| List plugins with available updates | wp plugin list --update=available |
| Reset an admin password | wp user update admin --user_pass=NewPass123! |
| Search and replace a URL across the DB | wp search-replace 'oldsite.com' 'newsite.com' --all-tables |
| Export the database | wp db export backup.sql |
| Flush and regenerate permalinks | wp rewrite flush |
| Deactivate every plugin (recovery) | wp plugin deactivate --all |
| Run pending cron events manually | wp cron event run --due-now |
| Check current WordPress version | wp core version |
A Real Example: Cleaning Up After a Migration
Say you've just moved a site to Getwebup and the URLs are still pointing at the old domain — broken images, wrong login redirects, the usual mess. Instead of hand-editing the database, do a dry run first so you can see what would change without touching anything:
wp search-replace 'http://oldsite.com' 'https://newsite.com' --all-tables --dry-runReview the count of replacements it reports. If it looks right, drop --dry-run and run it for real. This handles serialized data correctly, which a plain SQL find-and-replace does not — that's the part that usually breaks widgets and page builder layouts when people try to do it by hand.
Common Errors and What They Mean
"Error: This does not seem to be a WordPress installation"
You're in the wrong directory, or WordPress core files aren't where WP-CLI expects them. Run wp --path=/home/username/public_html core version to point it at the right folder explicitly.
"-bash: wp: command not found" after installing
The binary isn't in your PATH. Either move it to a directory that already is (like ~/bin on cPanel, if that's listed in .bashrc), or run it with the full path: /home/username/bin/wp --info.
"PHP Fatal error" or blank output when running a command
WP-CLI uses the PHP CLI binary, which can be a different version from the one your site runs under in cPanel's MultiPHP Manager. Check with wp cli info — if the PHP version listed doesn't match what your site needs, you'll need to point WP-CLI at the right PHP binary or adjust it via cPanel.
Command hangs or times out on a large site
Big search-replace or export jobs on databases with tens of thousands of rows can take a while over a jailed shell. Run them inside screen or tmux so the process survives if your SSH session drops:
screen -S wpcli
wp search-replace 'old.com' 'new.com' --all-tables
# Ctrl+A then D to detach, screen -r wpcli to reattachAutomating Routine Maintenance With Cron
Once you're comfortable with the commands, you can schedule them through cPanel's Cron Jobs so updates happen without you logging in at all:
cd /home/username/public_html && /home/username/bin/wp plugin update --all --quietSet this to run weekly, and pair it with an automated database export beforehand so a bad plugin update is never more than a restore away.
Prevention: Don't Let CLI Speed Skip Safety
WP-CLI is fast enough that it's tempting to skip the caution you'd normally use in wp-admin. Don't.
- Always run a full backup (
wp db exportplus a files backup) beforecore update, bulk plugin updates, or anysearch-replace. - Use
--dry-runonsearch-replaceevery time before committing to it. - Test destructive commands on a staging copy first if the site is business-critical — Getwebup's cPanel staging tool makes this a two-minute step.
- Avoid running WP-CLI as root on a VPS if the site files are owned by a different user — it'll change file ownership and cause permission errors afterward.
Once it's part of your routine, WP-CLI turns maintenance that used to eat twenty minutes of clicking into a single command you can paste and forget. If you get stuck on a specific command or an install won't cooperate, Getwebup support can walk through it with you over a ticket.