#37199 closed enhancement (fixed)
Strengthen language in wp-config-sample.php
Reported by: | kraftbj | Owned by: | jorbin |
---|---|---|---|
Milestone: | 5.8 | Priority: | low |
Severity: | minor | Version: | |
Component: | Bootstrap/Load | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
The current /* That's all, stop editing! Happy blogging. */
line can be easily misunderstood when a novice power user is editing/adding things to their wp-config.php file.
We can tweak the language to avoid confusion and folks adding any custom define values after the line to call wp-settings.php.
Attachments (4)
Change History (24)
#1
@
8 years ago
- Summary changed from Strengthen language in wp-content-sample.php to Strengthen language in wp-config-sample.php
This ticket was mentioned in Slack in #polyglots by sergey. View the logs.
8 years ago
#4
@
8 years ago
Piggy-backing on this and wondering if this could be an opportunity to rid us of the outdated (or at least, less used) "blogging" reference :)
This ticket was mentioned in Slack in #core by jorbin. View the logs.
8 years ago
#6
@
8 years ago
- Keywords has-patch removed
Discussed this during a bug scrub today, The direction that was decided is:
1) Keep the existing final line, but add in a line /* Add any custom values above this line. */
above it. That language likely can be improved. Suggestions welcome.
2) Need to make sure to work with polyglots for locales that customize wp-config-sample.php
#7
@
8 years ago
Maybe something like "Any customization must occur above this line.", "Do not change or add anything beyond this point/after this line"?
#10
@
3 years ago
- Owner set to jorbin
- Resolution set to fixed
- Status changed from new to closed
In 50915:
#11
@
3 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
There are some references to these lines on Network Setup screen:
- In wp-admin/network.php:
Add the designated lines of code to wp-config.php (just before
/*...stop editing...*/
)
- In wp-admin/includes/network.php:
Add the following to your
wp-config.php
file in ... above the line readingThat’s all, stop editing! Happy publishing.
:
As it is now, anyone following these instructions directly and not familiar with how PHP works might accidentally place the code inside the PHP comment block, which would not work as intended.
Should these instructions be updated for the new wording?
#12
@
3 years ago
- Keywords has-patch commit added
I think an easy solution to comment:11 would be to place all of the comment on a single line, as it was in 37199.diff.
This pushes the line to 94 characters, which is a bit higher than the recommended cut-off point of 80 characters as per the documentation standards, but is still within the limit of 120 characters.
See 37199.2.diff.
#13
@
3 years ago
I think you are correct to put it on a single line as it will help folks who are less familiar with PHP.
This ticket was mentioned in Slack in #core by sergey. View the logs.
3 years ago
#16
@
3 years ago
FWIW this breaks WP-CLI's `wp config update` command, which currently looks for "/* That's all, stop editing!" in wp-config.php
Maybe this can be fixed on the WP-CLI side though, but I thought I'd mention it here so we can consider undoing the change on the WP side.
cc @schlessera
#17
@
3 years ago
Thanks for the ping, @swissspidy!
There are probably more integrations that this will break apart from WP-CLI, as most managed hosting platforms customize the config file in some form or other.
For WP-CLI I can plan a more flexible anchor pattern to take this into account, but I wonder whether it wouldn't be a good opportunity to rethink the configuration file in general, if we're already breaking existing integrations anyway...
For example, how about allowing for a configuration file to only contain configuration, and not be a needed part of the loading process (i.e. right now there is a hard require of wp-settings.php
directly in the config file)?
So, WP could for example pull in the configuration file, and then, if WP was not already loaded in the next line of code, load wp-settings.php
from there. This way, the wp-config.php
file would actually be what its names claims to be.
#18
@
3 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening to address the concerns of backward compatibility with various integrations.
I think we can restore that line as it was, and just expand the line above a bit more. That should still make the message clear while avoiding unnecessary breakage. See 37199.3.diff.
Add a specific reference to where custom values should go and strengthen to the do not edit warning.