Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions how-to/how-to-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ desired folder name and the `--locale=it_IT` with your desired locale. You can o

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


```
$ wp config create --dbname=your_db_name_here --dbuser=your_db_user_here --prompt=dbpass
$ wp config create --dbname=your_db_name_here --dbuser=your_db_user_here --dbhost=your_db_host --prompt=dbpass
1/10 [--dbpass=<dbpass>]: type_your_password
Success: Generated 'wp-config.php' file.
```

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.


### Step 3 - Create the database

Expand Down
Loading