The SITE command group provides information about the WordPress site the terminal is running on.
These commands are useful for admins, developers, and advanced users who want quick environment or domain details.
To view these commands inside the terminal:
help site
You will see:
SITE commands:
hostname, site - Show site information.
dns, domain - Show site domain.
Below is a complete explanation of each command.
1. hostname / site — Show Site Information #
Displays general information about the current WordPress site.
Output may include:
- Site title
- Site URL
- WordPress environment (e.g., staging, production)
- Hostname / server name
- Protocol (http/https)
Examples:
hostname
or:
site
This command is helpful when working on multi-site setups, multiple environments, or cloud-based deployments where hostnames change.
2. dns / domain — Show Site Domain #
Shows the domain information of the site.
Typical output includes:
- Primary domain
- Subdomain (if applicable)
- Domain suffix
- Parsed domain segments
Examples:
dns
or:
domain
This is useful for:
- debugging multisite
- working on migrations
- environment checks
- verifying correct domain resolution
Summary #
The SITE group provides:
✔ Site name #
✔ Hostname #
✔ Domain info #
✔ Environment hints #
✔ Useful for developers, admins, and multisite operators #
These commands give users an instant overview of where the terminal is being executed.