Skip to content

Password set incorrectly by core install, having to reset password after install #305

Closed as not planned

Description

@josvlaar

I'm installing WordPress with the following Bash script. When entering the admin username (ICT Mee) and password uhg4vvHofMb0n"LPX2FoV?usa%%wD9 , WordPress installs successfully but I cannot login with these credentials after install. Are my single/double quotes (or a lack thereof) correct? Visual Studio Code would only show the variables in blue with double quotes or no quotes, with single quotes the variable appears in red. Do I need to use single quotes when inserting the values from a variable?

read -p "Enter site title: " title
read -p "Enter admin username: " adminuser
read -p "Enter admin email: " adminemail
read -p "Enter admin password: " -s adminpassword
wp core install --url=https://$hostname --title="$title" --admin_user="$adminuser" --admin_email=$adminemail --admin_password=$adminpassword --skip-email

Thank you for your time!

Activity

  1. josvlaar commented on Jan 30, 2026

    @josvlaar
    Author

    I've tested it and having single quotes around the password also didn't work...

  2. wojsmol commented on Jan 30, 2026

    @wojsmol
    Contributor

    Hi
    Here's a fixed version of a script - with proper quoting

     read -p "Enter site title: " title
     read -p "Enter admin username: " adminuser
     read -p "Enter admin email: " adminemail
     read -p "Enter admin password: " -s adminpassword
    -wp core install --url=https://$hostname --title="$title" --admin_user="$adminuser" --admin_email=$adminemail --admin_password=$adminpassword --skip-email
    +wp core install --url=https://$hostname --title="$title" --admin_user="$adminuser" --admin_email="$adminemail" --admin_password="$adminpassword" --skip-email
    
  3. josvlaar commented on Feb 2, 2026

    @josvlaar
    Author

    Thank you for your answer. I tried that and it didn't work, sadly. Maybe there is some incompatibility between WP CLI and the newest Nginx/PHP/MySQL? I get mine from:
    sudo add-apt-repository ppa:ondrej/nginx -y
    sudo add-apt-repository ppa:ondrej/php -y
    wget https://dev.mysql.com/get/mysql-apt-config_0.8.36-1_all.deb
    sudo apt install gnupg -y
    sudo dpkg -i mysql-apt-config_0.8.36-1_all.deb
    rm mysql-apt-config_0.8.36-1_all.deb

    WP CLI I get from curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar.

    Any more ideas as to what could cause this?

  4. wojsmol commented on Feb 2, 2026

    @wojsmol
    Contributor

    Hi @josvlaar

    GitHub issues are meant for enhancement requests and specific, reproducible bugs, not for general support questions. For WP-CLI support options, please review http://wp-cli.org/#support

    The easiest way to get support is to join us in the #cli channel on the Make WordPress Slack Team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions