Title: Activate via CLI
Last modified: August 10, 2018

---

# Activate via CLI

 *  Resolved [poshporcupine](https://wordpress.org/support/users/poshporcupine/)
 * (@poshporcupine)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/activate-via-cli/)
 * I would like to use wp static site generator as part of an automated process.
   I can’t find any information about how to interact with it via WP CLI, just a
   couple of topics implying that works. Do you have any info on how I would trigger
   it via cli? Also how would I tell if it was done? And is there a way to switch
   configs at the cli as well?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Leon Stafford](https://wordpress.org/support/users/leonstafford/)
 * (@leonstafford)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/activate-via-cli/#post-10580374)
 * G’day [@poshporcupine](https://wordpress.org/support/users/poshporcupine/),
 * I’m happy to get this solution working for you.
 * Activation works OK via CLI, as I use this in my development setup. I’m still
   manually doing the “opt-in”/activating licenses for the Freemius SDK.
 * see code examples at [https://github.com/leonstafford/wordpress-static-html-plugin/blob/master/provisioning/post_launch.sh](https://github.com/leonstafford/wordpress-static-html-plugin/blob/master/provisioning/post_launch.sh)
 *  – # activate when you already have the plugin’s zip available
    – wp –allow-root
   plugin activate wordpress-static-html-output – # download and install from latest
   release – wp –allow-root plugin install static-html-output-plugin –activate
 * That’s activation via WP-CLI
 * For actually triggering an export via the CLI, there is only this hook at the
   moment, but it has a bug I’m working on currently:
 * [http://docs.wp2static.com/advanced-usage/scheduling-automated-exports-via-wp-cron/](http://docs.wp2static.com/advanced-usage/scheduling-automated-exports-via-wp-cron/)
 * Please email me on [leonstafford@protonmail.com](https://wordpress.org/support/topic/activate-via-cli/leonstafford@protonmail.com?output_format=md)
   and we can get this use case working (I need it myself, as do many users!).
 * Cheers,
 * Leon

Viewing 1 replies (of 1 total)

The topic ‘Activate via CLI’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/static-html-output-plugin_cce3eb.
   svg)
 * [WP2Static](https://wordpress.org/plugins/static-html-output-plugin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/static-html-output-plugin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/static-html-output-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/static-html-output-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/static-html-output-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/static-html-output-plugin/reviews/)

## Tags

 * [automation](https://wordpress.org/support/topic-tag/automation/)
 * [cli](https://wordpress.org/support/topic-tag/cli/)

 * 1 reply
 * 2 participants
 * Last reply from: [Leon Stafford](https://wordpress.org/support/users/leonstafford/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/activate-via-cli/#post-10580374)
 * Status: resolved