After WordPress has been downloaded in the post-install-cmd script, we need to run the wp core install command to install WordPress.
For existing projects, we might want to consider some kind of database migration script instead of installing the default WordPress database since the DB will be wiped anyway. An example would be when a 2nd dev is cloning the project, they would still want to download WordPress, but would not need to run the installer or any database cleanup items.
Summary
After WordPress has been downloaded in the
post-install-cmd
script, we need to run thewp core install
command to install WordPress.For existing projects, we might want to consider some kind of database migration script instead of installing the default WordPress database since the DB will be wiped anyway. An example would be when a 2nd dev is cloning the project, they would still want to download WordPress, but would not need to run the installer or any database cleanup items.
WP CLI Docs:
wp core install
: https://developer.wordpress.org/cli/commands/core/install/create-project
step to.ddev/.env
:wp core install --url="{PROJECT_URL}" --title="{SITE_TITLE}" --admin_user="viget" --admin_email="{ADMIN_EMAIL}" --admin_password="{ADMIN_PASSWORD}" --skip-email
wp theme activate "{THEME_SLUG}"
wp option update blogdescription "{PROJECT_DESCRIPTION}"