[wp-trac] [WordPress Trac] #45138: mixed line endings: wp-config-sample.php uses CRLF (windows) line endings

WordPress Trac noreply at wordpress.org
Sat Oct 20 14:27:58 UTC 2018

#45138: mixed line endings: wp-config-sample.php uses CRLF (windows) line endings
 Reporter:  mattpr        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  trivial       |  Resolution:
 Keywords:  close         |     Focuses:

Comment (by mattpr):

 Okay.  I was just quite surprised to find a mix between files.  Not common
 to see that in large projects.

 It came up for me because my own deployment is scripted as well as my
 backup and restore.
 Some of that involves scripted file editing (sed, etc)...which of course
 leads to a mix of line endings within the file with windows line endings.

 Editors like vim (or notepad++, etc) are smart enough to detect the file
 line endings and be consistent with their edits...although I grant you
 Windows Notepad probably isn't.

 Don't have an issue with windows line endings...if wordpress is setup for
 windows line endings, then I just factor that into my provisioning stuff.
 When it is a mix where some files are CRLF and some files are LF...then it
 is more messy because I can't set one default but need to check every file
 every time and potentially do a conversion.

 I am sure Windows Notepad users are more helpless than I am, so if that is
 a big part of your user base, then I guess it makes sense to stick with a
 system that is more friendly to them (ie make the one file they are likely
 to edit appear properly in the only built-in plain text editor on their

 I can just add line ending checks/conversions to all my provisioning code
 now that I know you use a mix of line endings.

Ticket URL: <https://core.trac.wordpress.org/ticket/45138#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list