How to ensure WordPress admin user has ID 1 when using WP-CLI?
-
Hi,
I’d like to create WordPress sites in a CI environment (connected to an external database) using a script with the following command:
wp core install \
--allow-root \
--path="$WP_CORE_PATH" \
--url="$WORDPRESS_SITE_URL" \
--title="$WORDPRESS_SITE_TITLE" \
--admin_user="$WORDPRESS_ADMIN_USERNAME" \
--admin_password="$WORDPRESS_ADMIN_PASSWORD" \
--admin_email="$WORDPRESS_ADMIN_EMAIL" \
--skip-emailThe database already exists and is empty.
However, I sometimes notice that the administrator user is not created with ID 1, but with ID 2 or 3.
Why can this happen? Is it possible to force the administrator user to have ID 1?
For context, I’m using the official WordPress Docker container, on which I’ve installed WP-CLI.
Thank you very much
Claudio
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.