Customizing Deployment with CLI Commands
This only works for newly created environments on Staq and does not retrospectively apply to existing sites in your account.
Staq’s Custom Deployment is a powerful feature that allows you to automate your workflow when it comes to creating a new environment on Staq. Via the WordPress Command Line (WP-CLI, the possibilities include:
- automatically installing certain plugins
- disabling Staq’s S3 offloading feature
- activating premium plugin with a license key
and so much more!
How to customize your Custom Deployment
Go to Global Settings > Custom Deployment where you can enable and tailor the post-deployment process with WP CLI commands.
This guide highlights common use cases and also allows for the incorporation of custom commands to meet specific needs.
Examples
Where we use 123456
as an example license key, please go ahead and replace it with your actual license key (please make sure you end it with a semi-colon).
Disabling S3 Offloads
To prevent automatic media offloading to S3 after deployment, use the command below:
wp wpstaq disable-s3-offload;
Activating your premium page builder license key
Elementor Pro
wp elementor-pro license activate 123456;
Beaver Builder
wp beaver register --license=123456;
Installing and activating a Theme
wp theme install twentysixteen --activate;
Activating a premium license for a plugin
Advanced Custom Fields Pro
wp eval 'acf_pro_update_license("123456");'
Beaver PowerPack
wp powerpack register --license=123456;
How to find the CLI command for other plugins/themes
Potentially ChatGPT can answer this for you. Or, alternatively, Google WP CLI command to install/activate/license <plugin>