https://github.com/spinupwp/spinupwp-cli
The official command-line tool for SpinupWP.
https://github.com/spinupwp/spinupwp-cli
cli php spinupwp
Last synced: 7 months ago
JSON representation
The official command-line tool for SpinupWP.
- Host: GitHub
- URL: https://github.com/spinupwp/spinupwp-cli
- Owner: spinupwp
- Created: 2021-08-27T12:40:01.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-11-18T17:08:03.000Z (7 months ago)
- Last Synced: 2025-11-18T17:22:24.909Z (7 months ago)
- Topics: cli, php, spinupwp
- Language: PHP
- Homepage: https://spinupwp.com
- Size: 31 MB
- Stars: 11
- Watchers: 6
- Forks: 1
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# SpinupWP CLI
[](https://github.com/spinupwp/spinupwp-cli/actions/workflows/tests.yml)
[](https://packagist.org/packages/spinupwp/spinupwp-cli)
[](https://packagist.org/packages/spinupwp/spinupwp-cli)
[](https://packagist.org/packages/spinupwp/spinupwp-cli)
## Installation
To get started, require the package globally via [Composer](https://getcomposer.org):
composer global require spinupwp/spinupwp-cli
In addition, you should make sure the `/vendor/bin` directory in your global Composer home directory is in your system's "PATH". Depending on your operating system this could be either `~/.composer/` or `~/.config/composer/`. You can use the `composer config --global home` command to check this location.
## Usage
Installing the SpinupWP CLI provides access to the `spinupwp` command.
spinupwp
You will need to generate an API token to interact with the SpinupWP CLI. After you have generated an API token, you should configure your default profile:
spinupwp configure
You can configure multiple profiles, which is useful if you're a member of multiple teams:
spinupwp configure --profile=hellfishmedia
To run a command using a specific profile, pass the profile option:
spinupwp servers:list --profile=hellfishmedia
If no profile is supplied, your default profile will be used (if configured).
### Servers
# Delete a server
spinupwp servers:delete
# Provision a custom server
spinupwp servers:create-custom
# Get a server
spinupwp servers:get --fields=id,name,ip_address,ubuntu_version,database.server
# List all servers
spinupwp servers:list --fields=id,name,ip_address,ubuntu_version,database.server
# Reboot a server
spinupwp servers:reboot
# Reboot all servers
spinupwp servers:reboot --all
# Start an SSH session
spinupwp servers:ssh
You can pass any properties of the [Server Schema](https://api.spinupwp.com/?shell#tocS_Server) to the `--fields` flag.
Nested properties should use dot notation, for example, `database.server`.
### Services
# Restart MySQL on a server
spinupwp services:mysql
# Restart MySQL on all servers
spinupwp services:mysql --all
# Restart Nginx on a server
spinupwp services:nginx
# Restart Nginx on all servers
spinupwp services:nginx --all
# Restart PHP on a server
spinupwp services:php
# Restart PHP on all servers
spinupwp services:php --all
# Restart Redis on a server
spinupwp services:redis
# Restart Redis on all servers
spinupwp services:redis --all
### Sites
# Create a site
spinupwp sites:create
# Delete a site
spinupwp sites:delete
# Run a Git deployment
spinupwp sites:deploy
# Get a site
spinupwp sites:get --fields=id,server_id,domain,site_user,php_version,page_cache,https
# List all sites
spinupwp sites:list --fields=id,server_id,domain,site_user,php_version,page_cache,https
# Purge the page cache for a site
spinupwp sites:purge --cache=page
# Purge the page cache for all sites
spinupwp sites:purge --all --cache=page
# Purge the object cache for a site
spinupwp sites:purge --cache=object
# Purge the object cache for all sites
spinupwp sites:purge --all --cache=object
# Start an SSH session as the site user
spinupwp sites:ssh
You can pass any properties of the [Site Schema](https://api.spinupwp.com/?shell#tocS_Site) to the `--fields` flag.
Nested properties should use dot notation, for example, `backups.next_run_time` or `git.branch`.
# Create a site using field flags instead of interactive prompts
spinupwp sites:create --installation-method="" \
--domain="" --https-enabled --site-user="" --db-name="" \
--db-user="" --db-pass="" --wp-title="" \
--wp-admin-email="" --wp-admin-user="" \
--wp-admin-pass="" --php-version="" --page-cache-enabled
A full reference of the available flags is available anytime.
# Display available Arguments and Options for site:create
spinupwp sites:create --help
## Upgrade
To update the SpinupWP CLI to the latest version, run:
composer global update