The Team 51 (Special Projects) CLI is an open source tool which offers a variety of functions. At any point you can see a full list of functions by running team51 list. The most common commands are listed below. This will allow you to easily copy and paste them to use.
A quick note before you read further though, the commands in the CLI now include a prompt based system, so you don’t need to learn all the arguments for a command. Try team51 jetpack:plugin-search for example, you’ll be prompted for next steps.
- Create a production site on Pressable with a new repo:
- Create a clone of a Pressable site to use a staging site:
- Create a production site on WPCOM with a new repo:
- Create a staging site for a WPCOM site:
- Create a GitHub repository without a site:
- List the plugins installed on a site
- Search for a plugin throughout all of our sites
- Add a new domain as primary domain to a Pressable site
- Add/Remove Blog Stickers on WPCom sites
- Connect a WPCom Staging Site to a GitHub Repository
- Cloning a Multisite
- Troubleshooting Issues
- Granting CLI Access to External Contractors
- Removing Users from WPCOM and Pressable sites
- Pulling Sites with Specific Stickers
- Pulling Site Count and Site List
- Pulling Site Traffic
- Pulling Woo Gross Sales
- Commands that contractors have default access to
Create a production site on Pressable with a new repo:
team51 pressable:create-site <pressable-site-slug> --repository=<github-repo-slug>
If the GitHub repository doesn’t exist, it will ask if you want to create it. Similarly, you’ll be asked if you want to change the default datacenter of the new site — you can use the up/down arrows to choose a different location.
If you prefer a wizard version of the process, simply type in team51 pressable:create-site and you’ll be guided through the process end-to-end.
Example:
team51 pressable:create-site example--repository=example
The command above created:
Github Repo: https://github.com/a8cteam51/example
Production URL: https://example-production.mystagingwebsite.com/
Create a clone of a Pressable site to use a staging site:
team51 pressable:clone-site <pressable-site-id-or-url> <suffix> --branch=<github-deployment-branch>
The default suffix is development but a good alternative is the issue number for which the staging site is being generated. The command will fail if a site with the given suffix already exists.
Note: we no longer support the temporary clone option which generated a suffix based on the timestamp. Please use a suffix that lets us figure out why the clone was created and whether it’s still needed!
The default GitHub deployment branch is develop.
If you’re unsure where the Pressable ID comes from, it’s the end of the URL when you view the website in Pressable:

If you prefer a wizard version of the process, simply type in team51 pressable:clone-site and you’ll be guided through the process end-to-end.
Optional and risky: if you have a good reason to do it, you can append --skip-safety-net to the command to not install SafetyNet on the cloned site.
Example:
team51 pressable:clone-site example.com
The command above created:
Staging URL: https://example-development.mystagingwebsite.com/
Note 1: the command might ask you about the root name of the site if you’re trying to clone an existing staging site whose production site has been deleted. Either confirm as-is or enter a new root name before confirming. The root name is the one that the [suffix] will be appended to.
Note 2: the command will also rotate passwords immediately after the new Pressable site has been deployed. Doing so will save any new concierge user’s password in the Internal Shared vault, or update the password for existing the entry in 1Password.
Note 3: You must check the new staging site after completing the CLI. You’ll do this by logging in to the new site, as well as checking the URL in your browser. And if the CLI fails in Terminal, please ping a teammate in Slack to help diagnose the problem.
Skip installing SafetyNet
If, for whatever reason, you want to not install SafetyNet on the new site, then add the --skip-safety-net option to your command:
team51 pressable:clone-site <pressable-site-id-or-url> <suffix> --branch=<github-deployment-branch> --skip-safety-net
Create a production site on WPCOM with a new repo:
team51 wpcom:create-site <wpcom-site-slug> --repository=[github-repo-slug]
If the GitHub repository doesn’t exist, it will ask if you want to create it. Unlike Pressable, we cannot use the CLI to choose a different datacenter yet.
If you prefer a wizard version of the process, simply type in team51 wpcom:create-site and you’ll be guided through the process end-to-end.
Note 1: Unlike Pressable sites, WPCOM sites don’t use DeployHQ. Instead, WPCOM sites deploy using the WPCOM native GitHub Deployments feature.
Note 2: If you get the following error, check to make sure that [sitename].wordpress.com does not already exist. If it does, it will cause this error.
API error (500 https://███████████████/wp-json/wpcomsp/wpcom/v1/sites): {"code":400,"message":"Bad Request","data":null}
Create a staging site for a WPCOM site:
team51 wpcom:clone-site <wpcom-site-id-or-url> --branch=<github-deployment-branch>
If you prefer a wizard version of the process, simply type in team51 wpcom:clone-site and you’ll be guided through the process end-to-end.
Optional and risky: if you have a good reason to do it, you can append --skip-safety-net to the command to not install SafetyNet on the cloned site.
Note 1: Unlike Pressable sites, a single staging site can exist for every WPCOM production site. If you try to create a clone of a site that already has a staging site, this command will fail.
Skip installing SafetyNet
If, for whatever reason, you want to not install SafetyNet on the staging site, then add the --skip-safety-net option to your command:
team51 wpcom:clone-site <wpcom-site-id-or-url> --branch=<github-deployment-branch> --skip-safety-net
Create a GitHub repository without a site:
team51 github:create-repository <github-repo-slug> --type=project --homepage="https://<url_to_production_site>.com" --custom-properties="php-globals-long-prefix=<php_long_prefix>" --custom-properties="php-globals-short-prefix=<php_short_prefix>"
The values of <php_long_prefix> and <php_short_prefix> can be anything but ideally would be somehow related to your project names. For example, if you project is named Foo Bar Spam Ham then a good long prefix would be foobar_spamham and a good short prefix would be fbsh.
If you don’t type in the --type=project option, you’ll be prompted to choose a repo type. Other options include, e.g., plugin. All options are asking which Team51 scaffold should be used to generate the repository simply.
Example:
team51 github:create-repository example-partner --type=project --homepage="https://example.com" --custom-properties="php-globals-long-prefix=example-partner" --custom-properties="php-globals-short-prefix=dd"
The command above created:
Github Repo: https://github.com/a8cteam51/example-partner
Connecting the new repository to an existing WPCOM Business site
team51 wpcom:connect-site-repository <wpcom-site-id-or-url> <github-repo-slug> --branch=trunk --target_dir="/wp-content/" --deploy
Connecting the new repository to an existing Pressable site
team51 deployhq:create-project <project-name> --repository=<github-repo-slug>
If successful, follow-up with:
team51 deployhq:create-project-server <project-name> <pressable-site-id-or-url> Production --branch=trunk
The <project-name> value must be the same in both commands (it’s the name of the project on DeployHQ and the server must be created in that project).
List the plugins installed on a site
You can export the list of plugins installed on a WPCOM Business site or Pressable site connected to WPCOM via Jetpack by running this command:
team51 jetpack:export-site-plugins <wpcom-site-id-or-url>
This will output the plugins to a CSV file in your Downloads folder but you can change that during the prompt.
Search for a plugin throughout all of our sites
team51 jetpack:plugin-search <plugin-name-or-textdomain-or-main-file>
This will search through all WPCOM Business sites and all Jetpack-connected sites to our team account, and return the values inside the console.
Include partial matches
team51 jetpack:plugin-search <plugin-name-or-textdomain-or-main-file> --partial
By including the option --partial you will get all the plugins that also kinda match the name. For example, if you search for woocommerce, you will also get all extensions containing woocommerce in their name.
Certain versions only
team51 jetpack:plugin-search <plugin-name-or-textdomain-or-main-file> --version-search=<version> --version-operator=<operator>
Supported operators are: <, <=, >, >=, ==, =, !=, <>
Add a new domain as primary domain to a Pressable site
team51 pressable:add-site-domain <pressable-site-id-or-url> --domain=<new-domain> --primary
Full details available in ███████████████ (search for the “pressable:add-site-domain” command). The --primary flag is optional.
Example usage:
team51 pressable:add-site-domain --primary atypi-production.mystagingwebsite.com atypi.org
This command will:
- Add a new domain to a given Pressable site
- If the current primary domain is the
*.mystagingwebsite.comone, it will also automatically become the primary domain - Otherwise this can also be done using the
--primaryflag in the command - Staging sites on Pressable do not support having domains added to them, so when using this command on a staging site, it will also convert the site into a production site
- If the current primary domain is the
- After adding the primary domain, the command will also execute the WP-CLI
search-replacecommand to replace all instances of the old domain name with the new one in the database (and also flush the object cache afterward) - It will also look through all 1Password entries tagged
team51-cliin the categoryloginand update the ones that match the old URL to match the new one such that autocomplete in the browser keeps working.
Note: If you’re unsure about the exact site name, just leave both arguments empty, and you will be prompted for them during an interactive prompt (with autocomplete options for the current domain).
Add/Remove Blog Stickers on WPCom sites
To add a blog sticker:
team51 wpcom:add-site-sticker <site> <sticker>
To remove a blog sticker:
team51 wpcom:remove-site-sticker <site> <sticker>
Example usage:
team51 wpcom:add-site-sticker 123456789 team51-strike or team51 wpcom:remove-site-sticker 123456789 team51-strike
You can use WPCom blog ID or the domain as the first argument of this command. Note that you’re limited only to certain stickers with this command, specifically those with a team51- prefix.
Connect a WPCom Staging Site to a GitHub Repository
team51 wpcom:connect-site-repository <site> <repository> --branch=develop
Example usage:
team51 wpcom:add-site-sticker 123456789 repository-slug --branch=develop
Because this is connecting a staging site, be sure to designate the develop branch. The site can be either the WPCom blog ID or the domain. The repository must be the repository slug e.g example-partner and you can specify any branch, but develop would be typical.
Cloning a Multisite
There are a few extra steps that must be performed when cloning a multisite. Details can be found here: ███████████████
Troubleshooting Issues
A good starting point is this: ███████████████
Note: a command might fail if our team’s shared user does not have all the required permissions for a site. For example, on Pressable, if we’re a collaborator without the required permission instead of the owner who always has all the permissions guaranteed.
There is no workaround other than reaching out to the partner to either grant us the missing permissions, or for them to handle the operation themselves manually (not via the CLI). We can probably do more to output this particular failure in the CLI but, if in doubt, check the error log of OpsOasis on Pressable — the exact error message there should pinpoint to this being the issue.
Granting CLI Access to External Contractors
Sometimes external contractors might also need CLI access when working on a project. In this case, follow these instructions:
- Set up an account with the role
Contractoron ███████████████ for the contractor (should use the same email address as their Special Projects 1PW guest account) - Have the contractor follow the steps in the README to set up the CLI locally: https://github.com/a8cteam51/team51-cli
- The contractor must log in into OpsOasis and generate an application password for their account; the generated app password should be added to their
~/.zshrcfile like this:export OPSOASIS_APP_PASSWORD="<app_password>"— the CLI should work after restarting the terminal
Removing Users from WPCOM and Pressable sites
team51 wpcom:delete-site-wp-user --multiple all
team51 pressable:delete-site-collaborator --delete-wp-user --multiple all
These commands will remove users (by email address) from access to our WPCOM sites, Pressable Collaborator access, and Pressable wp-admin access.
Pulling Sites with Specific Stickers
team51 wpcom:list-sites-with-sticker team-51-strike
These commands will pull list of sites that have been stickered / flagged with specific flags.
███████████████
More context in our internal documentation: ███████████████.
Pulling Site Count and Site List
team51 wpcom:list-sites
This command will output a list of all Special Projects production sites, their Blog IDs, where they are hosted, and a report summary.
Pulling Site Traffic
team51 wpcom:list-sites-stats-summary
The command outputs a table sorted by the sites with the highest traffic over the given time period, and also summarizes traffic across all sites. You can adjust the command for the period.
If we’re looking for Q2 2025 metrics:
team51 wpcom:list-sites-stats-summary --num=3 --period=month --date=2025-06-30
If you’re looking for traffic across all of our sites in 2024:
team51 wpcom:list-sites-stats-summary --period=year --date=2024-12-31
Pulling Woo Gross Sales
team51 wpcom:list-sites-stats-orders --unit=year --date=2024
We can pull order information from WordPress.com for Jetpack-connected sites. It is using an undocumented endpoint, so the formatting is a little strange. For quarterly data, run 3 different commands and combine them:
team51 wpcom:list-sites-stats-orders --unit=month --date=2025-04
team51 wpcom:list-sites-stats-orders --unit=month --date=2025-05
team51 wpcom:list-sites-stats-orders --unit=month --date=2025-06
Commands that contractors have default access to
This is the list of CLI commands that external contractors have access to by default, unless higher access is granted to them on an individual basis:
team51 pressable:create-site-collaborator
team51 pressable:open-site-shell
team51 pressable:list-site-php-errors
