I use this to set the default homepage on a new Lokl site:
wp post update 1 --post_title="Getting started with Lokl"
wp post update 1 --post_content="Use this site as your starting point or import content from an existing site. <a href='/wp-admin'>View Dashboard</a>"
wp option update page_on_front 1
wp option update show_on_front "page"
This works as I intended, but doesn't look like a valid WP config, as post ID 1 is a Post, not a Page.
When going to Settings > Reading, we can see the radio for A static page vs Your latest posts, but neither of the dropdown options are selected.
When running wp profile stage, the following errors are seen:
Warning: Some code is trying to do a URL redirect. Backtrace:
14 call_user_func(Closure Object (), Array (), Array ([format] => table,[order] => ASC)) called at [phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php:491]
15 WP_CLI\Dispatcher\Subcommand->invoke(Array (), Array ([format] => table,[order] => ASC), Array ()) called at [phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:399]
16 WP_CLI\Runner->run_command(Array ([0] => profile,[1] => stage), Array ()) called at [phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:422]
17 WP_CLI\Runner->run_command_and_exit() called at [phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:107]
18 WP_CLI\Runner->do_early_invoke(before_wp_load) called at [phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1136]
19 WP_CLI\Runner->start() called at [phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php:23]
20 WP_CLI\Bootstrap\LaunchRunner->process(WP_CLI\Bootstrap\BootstrapState Object ([WP_CLI\Bootstrap\BootstrapStatestate] => Array ())) called at [phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php:77]
21 WP_CLI\bootstrap() called at [phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php:27]
22 include(phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php) called at [phar:///usr/bin/wp/php/boot-phar.php:11]
23 include(phar:///usr/bin/wp/php/boot-phar.php) called at [/usr/bin/wp:4]
Common WP-CLI don't seem to be affected yet, but this is a bug in Lokl's default site example that should be fixed.
I use this to set the default homepage on a new Lokl site:
This works as I intended, but doesn't look like a valid WP config, as post ID 1 is a Post, not a Page.
When going to Settings > Reading, we can see the radio for
A static page
vsYour latest posts
, but neither of the dropdown options are selected.When running
wp profile stage
, the following errors are seen:Common WP-CLI don't seem to be affected yet, but this is a bug in Lokl's default site example that should be fixed.