Add dbhost parameter to wp config create command documentation - #637
Add dbhost parameter to wp config create command documentation#637brentmartinmiller wants to merge 3 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.
📝 WalkthroughWalkthroughThe installation guide updates the ChangesInstallation documentation
Estimated code review effort: 1 (Trivial) | ~3 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
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