Repository navigation
Add dbhost parameter to wp config create command documentation - #637
brentmartinmiller wants to merge 4 commits into
Conversation
Updated command syntax to include database host parameter and clarified instructions for replacing placeholders.
| 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>]` |
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
| ``` | ||
|
|
||
| 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>]:` |
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.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Document database host options how-to/how-to-install.md |
The command syntax includes optional --dbhost=<dbhost>. The guide explains password prompting, the localhost default, Unix socket behavior, and the TCP fallback. |
Priority:
Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Other
Suggested reviewers: swissspidy
Merge Risk: 
Minimal · up to c7f45
-
The installation guidance update is safe to merge.
Pre-merge checks: 
5
-
Full details: Title check
-
Explanation
The title names the main change: the PR adds the optional --dbhost parameter to the wp config create syntax in the install documentation. The raw summary confirms the only changed file is how-to/how-to-install.md, which documents this parameter and the TCP host workaround for connection errors. The title is specific, concise, and matches the PR objectives (PR
#637).
Full details: Docstring Coverage
-
Explanation
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@how-to/how-to-install.md`:
- Line 27: Update the fenced code block in the installation instructions to
include a shell-session language identifier, using console or shell on its
opening fence, while preserving the block contents.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f4125a74-6b87-4131-96e2-0f8539247ec4
📒 Files selected for processing (1)
how-to/how-to-install.md
| 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>]` | ||
|
|
||
| ``` |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add a language identifier to the fenced code block.
The block contains a shell session but has no language identifier. Change the opening fence to ```console or ```shell so Markdown linting passes MD040.
🧰 Tools
🪛 markdownlint-cli2 (0.23.2)
[warning] 27-27: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@how-to/how-to-install.md` at line 27, Update the fenced code block in the
installation instructions to include a shell-session language identifier, using
console or shell on its opening fence, while preserving the block contents.
Source: Linters/SAST tools
Updated command syntax documentation to include database host parameter and clarified instructions for replacing placeholders.
Summary by CodeRabbit
localhost.127.0.0.1:3306.