On a fresh WordPress install in Linux distributions,
wp-config-sample.php contains Carriage Return control characters that are not found in any other .php file in the distribution.
egrep -l $'\r'\$ *.php
in WP's base dir, will return only
I am not worried about eliminating the control character, nor am I worried that it interferes with install operations (it doesn’t).
I’d just like to find out if there’s a reason why
wp-config-sample.php is the only file with this anomaly.
Issue was reported in version 4.6.15. It is still present in the latest version 5.5
This behavior has been seen in
- Debian 10 CLI-only
- Ubuntu 18.04.4 LTS
- Ubuntu 12.04.5 LTS
- Ubuntu 20.04.1 LTS
Install files have been downloaded either
- as .zip file (e.g. wordpress-5.5.zip) or
- as .tar.gz file (e.g. wordpress-5.5.tar.gz)
- via wget:
- via WP CLI:
wp core download
- via a Web browser (in GUI environments)
Example screenshot from Ubuntu 12.04.5 LTS