Add dbhost parameter to wp config create command documentation#637
Open
brentmartinmiller wants to merge 2 commits into
Open
Add dbhost parameter to wp config create command documentation#637brentmartinmiller wants to merge 2 commits into
brentmartinmiller wants to merge 2 commits into
Conversation
Updated command syntax to include database host parameter and clarified instructions for replacing placeholders.
swissspidy
reviewed
May 21, 2026
| In this step, we will generate a config file and set up the database | ||
| credentials for our installation. | ||
| The basic syntax of the command is the following: `wp config create --dbname=<dbname> --dbuser=<dbuser> [--dbpass=<dbpass>]` | ||
| The basic syntax of the command is the following: `wp config create --dbname=<dbname> --dbuser=<dbuser> --dbhost=<dbhost> [--dbpass=<dbpass>]` |
Member
There was a problem hiding this comment.
dbhost is optional and thus needs square brackets.
FWIW, all the other arguments are optional too nowadays, if using SQLite. See https://github.com/wp-cli/config-command/#wp-config-create
swissspidy
reviewed
May 21, 2026
| ``` | ||
|
|
||
| The command above generates the `wp-config.php` file and adds to it the database credentials that you passed. Make sure to replace `your_db_name_here` with the name you want to assign to the database, replace `your_db_user_here` with your database user and type the database password when prompted with the following: `1/10 [--dbpass=<dbpass>]:` | ||
| The command above generates the `wp-config.php` file and adds to it the database credentials that you passed. Make sure to replace `your_db_name_here` with the name you want to assign to the database, replace `your_db_user_here` with your database user, replace `your_db_host` with your database host (e.g., 127.0.0.1:3306) and type the database password when prompted with the following: `1/10 [--dbpass=<dbpass>]:` |
Member
There was a problem hiding this comment.
We could add a suggestion here to simply check wp config create --help to see how to use it. Less repetitive.
Clarified the command syntax for generating the config file by making the --dbhost parameter optional. Added information about the default behavior of the --dbhost parameter on Unix-like systems.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated command syntax documentation to include database host parameter and clarified instructions for replacing placeholders.