Support Home > Developers > Jetpack CLI

Jetpack CLI

In this article, you’ll learn commands to utilize Jetpack CLI and configure your Jetpack options and features.

Jetpack CLI is a command line interface for Jetpack, extending off of wp-cli for WordPress. 

You can easily modify your installation of Jetpack with just a few simple commands. All you need is SSH access and a basic understanding of command-line tools.

wp jetpack

Usage:

  • wp jetpack status [<full>]
  • wp jetpack module <list|activate|deactivate|toggle> [<module_name>]
  • wp jetpack options <list|get|delete|update> [<option_name>] [<option_value>]
  • wp jetpack protect <whitelist> [<ip|ip_low-ip_high|list|clear>]
  • wp jetpack reset <modules|options>
  • wp jetpack disconnect <blog|user> [<user_identifier>]

wp jetpack status

wp jetpack status [<full>]

Get the details about your Jetpack setup.

  • wp jetpack status : Get basic Jetpack details.
  • wp jetpack status full : Get full details, including the Jetpack version, WordPress version, and more.

wp jetpack module

wp jetpack module <list|activate|deactivate|toggle> [<module_name>]

Interact with individual modules!  Activate, Deactivate, Toggle, and List.

  • wp jetpack module list : List all modules, and their status (Activated or Deactivated)
  • wp jetpack module activate stats : Will activate the Stats module
    • wp jetpack module activate all : Will activate all modules
  • wp jetpack module deactivate stats : Will deactivate the Stats module
    • wp jetpack module deactivate all : Will deactivate all modules
  • wp jetpack module toggle stats : Will toggle the Stats module on/off

wp jetpack options

wp jetpack options <list|get|delete|update> [<option_name>] [<option_value>]

Jetpack options management!  You can list all your Jetpack options (and their values), get individual option values, update some options, and delete non-essential ones.

  • wp jetpack options list : List all Jetpack options and their values
  • wp jetpack options get <option_name> : Get the value of a specific option
  • wp jetpack options delete <option_name> : Delete a specific option (only ones not essential to your connection to WordPress.com)
  • wp jetpack options update <option_name> <option_value> : Update an option with a new value.  (only works for string option values)

wp jetpack reset

wp jetpack reset <modules|options>

Reset your Jetpack environment to default states.  Can either reset all Jetpack options or just revert back to defaulted active modules.

  • wp jetpack reset modules : Resets modules to default active state
  • wp jetpack reset options : Resets options to default state, as if you just connected for the first time.  (note – also resets modules to default)

wp jetpack disconnect

wp jetpack disconnect <blog|user> [<user_identifier>]

Disconnect Jetpack from WordPress.com, or unlink a user’s account from their WordPress.com connection.

  • wp jetpack disconnect blog : Will disconnect Jetpack from WordPress.com
  • wp jetpack disconnect user <id|email|username> : Will unlink their user account from WordPress.com

wp jetpack protect

wp jetpack protect <whitelist> [<ip|ip_low-ip_high|list|clear>]

Allowlist an IP address from Protect.

  • wp jetpack protect whitelist list : Will list your current allowlist
  • wp jetpack protect whitelist clear : Will clear your current allowlist
  • wp jetpack protect whitelist <ip_address> : allowlist a single IP address
  • wp jetpack protect whitelist <ip_low-ip_high> : allowlist a range of IP addresses.
  • Table Of Contents

  • Contact Us

    Need more help? Feel free to contact us.