WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#11523 closed defect (bug) (fixed)

wp-config-sample.php inconsistency

Reported by: joshtime Owned by: nacin
Milestone: 3.0 Priority: normal
Severity: trivial Version: 2.2
Component: Upgrade/Install Keywords: has-patch tested
Focuses: Cc:

Description

In wp-config-sample, there is a minor inconsistency.

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'putyourdbnamehere');

/** MySQL database username */
define('DB_USER', 'usernamehere');

/** MySQL database password */
define('DB_PASSWORD', 'yourpasswordhere');

DB_NAME says "put"
DB_USER says only "here"
DB_PASSWORD has "your". Password is not personal

Should be:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'dbnamehere');

/** MySQL database username */
define('DB_USER', 'usernamehere');

/** MySQL database password */
define('DB_PASSWORD', 'passwordhere');

Attachments (3)

11523.patch (659 bytes) - added by joshtime 4 years ago.
Patch file
11523.2.patch (899 bytes) - added by joshtime 4 years ago.
The patch for setup-config.php
11523.3.patch (1.6 KB) - added by hakre 4 years ago.
Consolidated patch (merged 2 prior patches into one)

Download all attachments as: .zip

Change History (20)

joshtime4 years ago

Patch file

comment:1 joshtime4 years ago

  • Keywords has-patch added

joshtime4 years ago

The patch for setup-config.php

comment:2 joshtime4 years ago

Also added a patch for setup-config.php because setup-config.php searches the values to replace.

comment:3 miqrogroove4 years ago

  • Severity changed from normal to trivial
  • Version set to 2.2

see also [5001]

hakre4 years ago

Consolidated patch (merged 2 prior patches into one)

comment:4 hakre4 years ago

  • Keywords tested added
  • Milestone changed from Unassigned to 3.0

Tested by running a new install from current trunk with patch applied. Worked.

comment:5 hakre4 years ago

  • Component changed from Comments to Upgrade/Install

comment:6 hakre4 years ago

Worth to commit or close as wontfix?

comment:7 follow-up: miqrogroove4 years ago

IMO, wontfix. The inconsistency actually helps me see the difference between code-pattern and string literals.

comment:8 in reply to: ↑ 7 joshtime4 years ago

Replying to miqrogroove:

IMO, wontfix. The inconsistency actually helps me see the difference between code-pattern and string literals.

We actually could have the difference between code-pattern and string literals but a fix in the inconsistency would also be good. We actually could have:

/** The name of the database for WordPress */
define('DB_NAME', 'putdbnamehere');

/** MySQL database username */
define('DB_USER', 'putusernamehere');

/** MySQL database password */
define('DB_PASSWORD', 'putpasswordhere');

comment:9 dd324 years ago

This gets a +1 from me, "Put Your Password Here" doesnt really specify what password, Whilst to a coder, being in the Database area givs us context, many users do not understand the way in which database connections work, and may expect the user password, rather than the mysql password.

Whitespace in the phrases would also be nice, "Database Name Here" for example.

comment:10 nacin4 years ago

  • Owner set to nacin
  • Status changed from new to assigned

comment:11 nacin4 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [13837]) Standardize db config-sample values. fixes #11523

comment:12 nbachiyski4 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

The WordPress convention is to use dashes over underscores whenever we can. In this case we can.

Also, whenever you change placeholders, could you send a mail to wp-hackers/wp-polyglots -- there are people, who replace these with meaningful values, like we do in core.

comment:13 nacin4 years ago

I was actually going to go with spaces, but imo I found that to be counter-intuitive for two reasons -- one, you won't normally find spaces in these values, and two, double-clicking the value would then only select a single word. In many editors, dashes don't handle the latter any differently than spaces. Hence the underscores.

comment:15 in reply to: ↑ 14 nacin4 years ago

Replying to nbachiyski:

Another place to be synced: http://core.trac.wordpress.org/browser/branches/iis/parameters.xml

We also need to add some salts there, possibly some other things.

comment:16 nacin4 years ago

(In [14542]) Update IIS parameters.xml to reflect new config-sample values. also add salts. see #11523.

comment:17 nacin4 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Email dispatched to wp-hackers and wp-polyglots. I think we've changed everything we need to do here.

Note: See TracTickets for help on using tickets.