Skip to main content

GHL-Hosted WordPress — SSH and WP-CLI Access

Overview​

  • What: Establish a real SSH shell to a GHL-hosted WordPress site and run WP-CLI for maintenance the wp-admin UI can't do efficiently (bulk plugin/option/cron operations, database export, indicator-of-compromise sweeps, sitemap debugging).
  • When: Any time a maintenance task needs shell/WP-CLI rather than point-and-click admin — e.g. removing orphaned plugin data, unscheduling leftover crons, scripted plugin audits, or taking a CLI database backup before a risky change.
  • Who: Web Specialist (with GHL hosting-panel access and the site's wp-admin login).
  • Time Required: ~15 min first-time setup per operator machine; under 1 minute to connect thereafter.

Background — the four access layers (this is what trips people up)​

GHL-hosted WordPress is real WordPress, and GHL exposes several distinct access channels. They are easy to confuse, and confusing them is the #1 cause of wasted time here:

ChannelWhat it gives youHost / PortUsername pattern
wp-admin (browser)Plugin install/activate, settings — UI onlyhttps://<domain>/wp-admina WordPress admin user
FTPFile transfer only (no shell)host, port 21<something>ftp@<host>
SFTPFile transfer over SSH (no shell)host, port 22varies
SSH + WP-CLIFull shell + wp commandsIP/host, port 22a numeric account (e.g. xgz4ici)

Hard-won traps:

  • Port 21 is FTP, port 22 is SSH. ssh … -p 21 will just hang — it's speaking SSH to a port that answers in FTP.
  • A username like <site>ftp@… plus port 21 is a file-transfer account, not a shell. WP-CLI needs the SSH shell account (the numeric one).
  • SFTP ≠ SSH shell. SFTP moves files; it does not run wp.
  • The SSH connection details (host / port 22 / numeric username) and the SSH key registration live in the GHL hosting panel under SSH Access / Manage SSH Keys — a different place from the FTP credentials.
  • The WordPress root is typically `[LOCAL_PATH_REMOVED]

Prerequisites​

  • GHL hosting-panel access for the target site (app.symphonycore.com → WordPress hosting management).
  • The site's wp-admin admin login (from 1Password).
  • An SSH keypair on the operator's Mac at ~/.ssh/id_ed25519. Check with ls ~/.ssh/*.pub; create one if absent: ssh-keygen -t ed25519 -C "<operator-or-machine-label>".
  • All credentials pulled from 1Password per the 1Password Config Standard. Never type or paste passwords, private keys, or key passphrases into chat tools or anything that produces a transcript.

Procedure​

A. Get the SSH connection details​

  1. In the GHL hosting panel for the site, open SSH Access. Record: Host (an IP or *.wpdns.site), Port (22), Username (numeric, e.g. xgz4ici).
  2. Note the WP root: usually `[LOCAL_PATH_REMOVED]

B. Register your SSH public key (preferred — key auth)​

  1. Copy the public key to the clipboard: pbcopy < ~/.ssh/id_ed25519.pub. (Public key only. The private key and its passphrase never leave the operator's machine.)
  2. In Manage SSH Keys: paste into the Public Key box, set a Key Name, and leave Key Passphrase blank — registering a public key does not require your private-key passphrase, and it should not be handed to the host.
  3. Click Import.
  4. If "Unable to import SSH key — duplicate key": a stale/old key already occupies that name. Delete the existing key entry first, then re-import. Confirm the registered key matches your local one by comparing fingerprints: ssh-keygen -lf ~/.ssh/id_ed25519.pub.

C. Connect​

  1. ssh <username>@<host> -p 22
  2. First connection only: it shows the server's host-key fingerprint and asks to continue — type yes (added to ~/.ssh/known_hosts).
  3. If the key is accepted you land at the server shell (macOS may prompt locally for your key passphrase — that is normal and stays on your machine).
  4. If instead it prompts <username>@<host>'s password: → key auth did not take. That prompt is the server account password, not your key passphrase. Two options:
    • Fastest: enter the SSH/account password for the numeric user from the GHL panel (type it into Terminal, never into a chat).
    • Cleaner: fix the key registration (step B4) so future connects are passwordless.
    • Diagnose with ssh -v <username>@<host> -p 22: lines reading Offering public key … Authentications that can continue: …,password then Next authentication method: password mean the server rejected your key (the registered key ≠ your local key).

D. Confirm WP-CLI​

  1. cd ~/public_html && wp --info → prints WP-CLI version, PHP binary, and config path.
  2. If wp: command not found, try a bundled phar (php ~/wp-cli.phar --info) or confirm with the host whether WP-CLI is available. If it isn't, fall back to wp-admin + the panel's phpMyAdmin for the task.

Common WP-CLI operations (with safety net)​

Always take a backup before any destructive operation:

# Explicit dated filename (don't rely on ambiguous defaults)
wp db export ~/<site>-2026-06-15-pre-change.sql && ls -lh ~/<site>-*.sql
TaskCommand
List pluginswp plugin list --fields=name,status,version --format=table
Remove a pluginwp plugin deactivate <slug> && wp plugin delete <slug>
Find orphaned optionswp option list --search='<prefix>*' --fields=option_name
Delete an optionwp option delete <option_name>
List scheduled cronswp cron event list
Unschedule a cronwp cron event delete <hook_name>
Admin-user audit (IoC)wp user list --role=administrator --fields=ID,user_login,user_email,user_registered

Re-run the relevant list command after each change to confirm, and spot-check externally where possible (e.g. curl -I https://<domain>/wp-content/plugins/<slug>/ should 404 after a delete).

Verification​

  • wp --info returns versions → shell + WP-CLI confirmed.
  • For a maintenance change: the matching wp … list reflects it, and an outside HTTP check (curl) agrees.
  • The pre-change wp db export backup file exists and is non-zero.

Troubleshooting​

SymptomCauseFix
ssh connects then hangs / no shellPointed at port 21 (FTP) or used the *ftp usernameUse the SSH host + port 22 and the numeric username
Unable to import SSH key — duplicate keyA stale key holds that key-name slotDelete the existing key entry, then re-import; verify fingerprints match
Prompts for password: even with a key loadedRegistered key ≠ local key (or none registered)Re-register the correct public key (B4), or use the account password
Host key verification failed (non-interactive, e.g. a chat ! runner)Host key not yet trusted, and no TTY to accept itConnect once interactively in Terminal to accept the host key
wp: command not foundWP-CLI not installed or not on PATHTry the phar path; otherwise use wp-admin + phpMyAdmin

Roles​

RoleResponsibility
Web SpecialistOperator — performs the access setup and runs the WP-CLI task.
Implementation LeadAccountable for this SOP's correctness and for approving destructive maintenance.

Document History​

DateVersionChangeAuthor
2026-06-151.0Initial — SSH + WP-CLI access to GHL-hosted WordPress: four-layer access disambiguation (wp-admin / FTP / SFTP / SSH), public-key registration with the duplicate-key fix, key-rejected→password fallback, and a WP-CLI maintenance quick-reference.Symphony Core Systems Team