WP-CLI Publish Command
This WP-CLI command allows you to start a publication from the command-line.
Note: WP-CLI is a command-line interface for WordPress that makes many tasks easier. See wp-cli.org for more information.
The basic command to start a publication is as follows:
wp staatic publish
Setting up Initializing crawler Crawling WordPress site Crawling... 100% [========================] 0:00 / 0:00 Finishing crawler Post-processing Initializing deployment Initializing indexer Deploying WordPress site Deploying... 100% [=======================] 0:00 / 0:00 Indexing WordPress site Finishing deployment Finishing indexer Finishing Success: Publication finished in 11 seconds!
There are some additional options available when running the publish command, which are all optional:
--[no-]preview: Whether or not to create a preview build, if supported by the deployment method.
--[no-]partial: Whether or not to create a partial build, publishing only changed posts.
--[no-]verbose: Whether or not to output log entries during publication.
wp staatic publish --preview --no-partial --verbose