WordPress WP-CLI 2 cheatsheet
WordPress WP-CLI 2: Setup
7 common WordPress WP-CLI 2 tasks.
Check your WP-CLI setup
Show the WP-CLI, PHP and OS versions and where the config files are.
wp cli info
Create wp-config.php
Write wp-config.php with your database details. Use real credentials.
wp config create --dbname=wordpress --dbuser=wp_user --dbpass=change-me --dbhost=localhost
Install WordPress
Run the installer: create tables, the first admin user and the site title.
wp core install --url=https://example.test --title="My Site" --admin_user=admin --admin_password=change-me --admin_email=[email protected]