Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: database credentials to wp-env docs #47940

Merged
merged 3 commits into from
Feb 9, 2023

Conversation

creative-andrew
Copy link
Contributor

@creative-andrew creative-andrew commented Feb 9, 2023

I was trying to access the database created by wp-env inside docker using phpMyAdmin and I couldn't find the credentials. I needed to search inside the package to find the default ones being set.
(

WORDPRESS_DB_USER: 'root',
)

const credentials = {
	WORDPRESS_DB_USER: 'root',
	WORDPRESS_DB_PASSWORD: 'password',
};
I was trying to access the database created by wp-env inside docker using TablePlus and I couldn't find the credentials. I needed to search inside the package to find the default ones being set.

https://github.com/WordPress/gutenberg/blob/d5915916abc45e6682f4bdb70888aa41e98aa395/packages/env/lib/config/db-env.js#L3
// Username and password used in all databases.
const credentials = {
	WORDPRESS_DB_USER: 'root',
	WORDPRESS_DB_PASSWORD: 'password',
};
@github-actions
Copy link

github-actions bot commented Feb 9, 2023

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @creative-andrew! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Feb 9, 2023
Copy link
Contributor

@alexstine alexstine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexstine alexstine added [Type] Enhancement A suggestion for improvement. [Type] Developer Documentation Documentation for developers labels Feb 9, 2023
@creative-andrew
Copy link
Contributor Author

@creative-andrew Maybe we should link here?

https://github.com/WordPress/gutenberg/blob/trunk/docs/contributors/code/getting-started-with-code-contribution.md

The DB port does change according to the docs.

I agree.

We could include a link to https://github.com/WordPress/gutenberg/blob/trunk/docs/contributors/code/getting-started-with-code-contribution.md#accessing-the-mysql-database

What do you think about:

The database credentials are: user root, password password. For a comprehensive guide on connecting directly to the database, refer to Accessing the MySQL Database.

Copy link
Member

@noahtallen noahtallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed about this, and also adding a link to the section about how to access the database

@creative-andrew creative-andrew changed the title Add database credentials to wp-env docs Feb 9, 2023
@noahtallen noahtallen merged commit bbf1e85 into WordPress:trunk Feb 9, 2023
@noahtallen
Copy link
Member

Thanks!

@github-actions github-actions bot added this to the Gutenberg 15.2 milestone Feb 9, 2023
@DaisyOlsen DaisyOlsen removed the [Type] Enhancement A suggestion for improvement. label Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Developer Documentation Documentation for developers
4 participants