Register License

WP Staging CLI requires a valid WP Staging Pro license (Agency or Developer plan) to extract or restore backups. This guide explains how to register and manage your license.

The easiest way to use your license is to register it once. After registration, your license key is encrypted and stored locally, so you don’t need to enter it again.

Interactive Mode:

wpstaging register

You’ll be prompted to enter your license key. The CLI will validate it with WP Staging servers and store it securely.

Non-Interactive Mode (for scripts/automation):

wpstaging register --license=YOUR_LICENSE_KEY

After registration: You can run any command without the --license flag. Your license key is encrypted and validated automatically.

Alternative Methods

If you prefer not to store your license, you can provide it in other ways:

Environment Variable

Set the WPSTGPRO_LICENSE environment variable to use your license without storing it:

Linux, macOS, WSL:

# Set for current session
export WPSTGPRO_LICENSE=YOUR_LICENSE_KEY

# Or add to ~/.bashrc or ~/.zshrc for permanent use
echo 'export WPSTGPRO_LICENSE=YOUR_LICENSE_KEY' >> ~/.bashrc

Windows PowerShell:

# Set for current session
$env:WPSTGPRO_LICENSE="YOUR_LICENSE_KEY"

# Or add to your PowerShell profile for permanent use
Add-Content $PROFILE 'export WPSTGPRO_LICENSE="YOUR_LICENSE_KEY"'

Windows CMD:

set WPSTGPRO_LICENSE=YOUR_LICENSE_KEY

Per-Command Flag

You can also provide your license key directly on each command:

wpstaging extract --license=YOUR_LICENSE_KEY backup.wpstg
wpstaging restore --license=YOUR_LICENSE_KEY --path=/var/www/html backup.wpstg

Deactivate License

To deactivate your license on the WP Staging servers and remove the stored key:

wpstaging deactivate

This command:

  • Contacts WP Staging servers to deactivate your license
  • Removes the stored license key from your local machine
  • Frees up a license slot on your account

Alias: You can also use wpstaging unregister as an alternative to deactivate.

Remove Stored License (Local Only)

To remove only the locally stored license without deactivating it on the server:

wpstaging clean license

This only removes the local license file. The license remains active on your WP Staging account. Use this if you want to switch to a different license or re-enter your key.

License Priority Order

WP Staging CLI checks for a license in this order:

  1. Command-line flag: --license=KEY
  2. Environment variable: WPSTGPRO_LICENSE
  3. Stored license: From wpstaging register

The first valid license found is used.

Troubleshooting

License Validation Failed

If you see a license validation error:

  • Verify your license key is correct
  • Check that your WP Staging subscription is active
  • Ensure you have an Agency or Developer license (not Personal)
  • Check your internet connection

License Already Activated

Each license can be activated on a limited number of devices. If you’ve reached your limit:

  1. Deactivate the license on an unused device: wpstaging deactivate
  2. Or purchase additional license slots at wp-staging.com

Cannot Connect to License Server

If the CLI cannot reach WP Staging servers:

  • Check your internet connection
  • Verify that wp-staging.com is accessible from your network
  • If behind a corporate firewall, ensure outbound HTTPS traffic is allowed

Next Steps

With your license registered, you’re ready to start using WP Staging CLI:

Updated on January 27, 2026