How to Install and Use WP-CLI on a GoAdmio Server

WP-CLI is WordPress from the command line: faster than the dashboard for one site, and the only sane way to manage fifty. On a GoAdmio server it installs in two commands and pays rent forever.

Install WP-CLI

Over SSH as root (or the account user with shell access from Security » Manage Shell Access):

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
mv wp-cli.phar /usr/local/bin/wp
wp --info

The last line confirms it runs. Add alias wp='wp --allow-root' to root’s shell profile if you operate as root, though running as the account user is cleaner.

The daily six

wp core update                    # update WordPress
wp plugin update --all            # update all plugins
wp plugin install wordfence --activate
wp user create jane jane@example.com --role=editor
wp search-replace 'old.com' 'new.com'   # after a domain change
wp db export backup.sql           # instant database dump

Each replaces a dashboard chore with a scriptable line. Run them from the site’s document root so WP-CLI finds the install.

Where WP-CLI shines on a panel server

  • Fleet maintenance: loop over every WordPress document root and run wp core update on each, with a log.
  • Emergency lockouts: wp user update admin --user_pass=... or the panel’s own Security » Change WordPress Password.
  • Migrations: wp db export, copy files, wp db import, wp search-replace. Four commands, moved site.

Careful on a shared server

Run WP-CLI as the account owner where possible so files stay correctly owned; if you must run as root, follow up with Accounts & Plans » Fix Permissions so the site can still manage its own files.

Pair WP-CLI with GoAdmio’s own /go commands and a whole server of WordPress sites becomes an afternoon job. More in the docs and at goadmio.com.

By:

Posted in:


Leave a Reply

Your email address will not be published. Required fields are marked *