You could reset access via WP CLI. See: https://developer.wordpress.org/cli/commands/user/
As far as I know, you have to write wp-env run cli before the command if you are using wp-env.
The wp-env does not create a default WordPress admin user. It just spins up WordPress and Mysql containers. You can create an admin user using WP-CLI with the following command
wp-env run cli wp user create admin admin@example.com --role=administrator --user_pass=password
On the otherhand wp-env does not include phpmyadmin. If you want it, add this to your .wp-env.override.json:
{
"phpmyadmin": {
"image": "phpmyadmin:latest",
"ports": ["8080:80"],
"environment": {
"PMA_HOST": "mysql",
"MYSQL_ROOT_PASSWORD": "password"
}
}
}
Restart your environment:
wp-env stop && wp-env start
Thread Starter
Jake
(@jakewpsupport)
@mabfahad and @threadi , Thanks for the input, those commands will probably be useful to me in the future. However, it appears the wp-env does create a default user name and password as mentioned in WordPress Developer Resources in the “Getting Started with wp-env” section, towards the bottom of the “Install and Run wp-env” section. Also, the process of installing wp-env and Docker seems to have included the latest versions of phpmyadmin, wordpress, and mariadb…maybe this is something new?
Looking at the .env file in my project folder, I noticed the default was “root” with “password”. The instructions I linked seem to mistakenly suggest logging in with “admin” as the user name. After using root instead of admin, I was able to access my dashboard.
Glad you were able to solve it. Feel free to suggest any changes to the documentation. According to the footer, the document is part of the Gutenberg team. I think you could report it as an issue there so that someone can take care of it: https://github.com/WordPress/gutenberg/issues
Thread Starter
Jake
(@jakewpsupport)
@threadi added as a contribution on GitHub.