WPHammer
Log in

WP-CLI

WP-CLI is the command-line interface for WordPress. WPHammer uses WP-CLI extensively behind the scenes — for inventory collection, plugin management, user operations, and more. You can also run WP-CLI commands directly on your sites from the WPHammer interface.

How it works

WP-CLI commands are executed over SSH on the target server. When you run a command:

  1. WPHammer connects to the server via SSH.
  2. The command is executed in the context of the site's directory and WordPress installation.
  3. Output is captured and returned to you in the WPHammer interface.

Commands run as the site's system user, respecting the same file permissions and database access that WordPress itself uses.

Running commands

From the site detail page, you can execute WP-CLI commands directly. Enter the command (without the wp prefix — WPHammer adds it automatically), and the output is displayed in the interface.

Commands are executed as background jobs, so long-running operations do not block your session. The command output and exit status are recorded for review.

Commands used by WPHammer

Many WPHammer features are built on WP-CLI commands:

  • Inventory collectionwp core version, wp plugin list, wp theme list to gather installed software versions
  • Plugin managementwp plugin update, wp plugin activate, wp plugin deactivate, wp plugin delete
  • Theme managementwp theme update, wp theme activate, wp theme delete
  • User managementwp user list, wp user create, wp user update, wp user delete
  • Magic Login — generates one-time login URLs through a custom WP-CLI command
  • Search and Replacewp search-replace for database-wide find-and-replace operations
  • Site URLwp option get siteurl to resolve the site's configured URL
  • Database info — reads wp-config.php values to resolve database credentials

Requirements

WP-CLI must be installed and accessible on the server for WordPress management features to work. During server onboarding, WPHammer checks for WP-CLI availability. If it is not installed, onboarding will flag this and some WordPress features will be unavailable until it is set up.

Related