Skip to content

Add dbhost parameter to wp config create command documentation - #637

Open
brentmartinmiller wants to merge 3 commits into
wp-cli:mainfrom
brentmartinmiller:patch-1
Open

Add dbhost parameter to wp config create command documentation#637
brentmartinmiller wants to merge 3 commits into
wp-cli:mainfrom
brentmartinmiller:patch-1

Conversation

@brentmartinmiller

@brentmartinmiller brentmartinmiller commented May 21, 2026

Copy link
Copy Markdown

Updated command syntax documentation to include database host parameter and clarified instructions for replacing placeholders.

Summary by CodeRabbit

  • Documentation
    • Clarified the optional database host setting during installation.
    • Documented default Unix socket behavior and the TCP connection fallback.
    • Clarified password prompting instructions and improved punctuation.

Updated command syntax to include database host parameter and clarified instructions for replacing placeholders.
@brentmartinmiller
brentmartinmiller requested a review from a team as a code owner May 21, 2026 17:14
@brentmartinmiller brentmartinmiller changed the title Add dbhost parameter to config creation command Add dbhost parameter to wp config create command documentation May 21, 2026
Comment thread how-to/how-to-install.md Outdated
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>]`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Comment thread how-to/how-to-install.md Outdated
```

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>]:`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We could add a suggestion here to simply check wp config create --help to see how to use it. Less repetitive.

brentmartinmiller and others added 2 commits May 21, 2026 14:39
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.
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The installation guide updates the wp config create command syntax. It documents the optional --dbhost argument, password prompting, localhost Unix socket behavior, and the 127.0.0.1:3306 TCP fallback.

Changes

Installation documentation

Layer / File(s) Summary
Document database host options
how-to/how-to-install.md
The command syntax includes optional --dbhost. The instructions explain password prompting, Unix socket behavior, and the TCP fallback.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: brianhenryie

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main documentation change: adding the optional dbhost parameter to the wp config create command.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1191ea5 and 68b25a6.

📒 Files selected for processing (1)
  • how-to/how-to-install.md

Comment thread 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>]`

```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants