Skip to content
Open
Changes from all commits
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: 4 additions & 2 deletions how-to/how-to-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@ 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>]`

```
$ wp config create --dbname=your_db_name_here --dbuser=your_db_user_here --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 and type the database password when prompted with the following: `1/10 [--dbpass=<dbpass>]:`.

The `--dbhost` parameter is optional and defaults to `localhost`. On Unix-like systems, including macOS, MySQL treats `localhost` as a Unix socket connection rather than TCP. If you encounter a connection error, rerun the command with an explicit TCP host, for example: `--dbhost=127.0.0.1:3306`.

### Step 3 - Create the database

Expand Down
Loading