#22334 closed enhancement (wontfix)
Fix: change default WP_DEBUG on localhost
Reported by: | DavidAnderson | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
I propose changing the default WP_DEBUG in wp-config-sample.php and in WordPress-generated config files to:
define('WP_DEBUG', ($_SERVER\['SERVER_NAME'\] == "localhost" ? true : false ));
This is surely a better default than at present:
- Sites on localhost are usually development sites, where WP_DEBUG should be on
- This will save some developers from having to change the setting as they move between live and development; it will work well in both
Change History (7)
#2
in reply to:
↑ 1
@
12 years ago
Replying to azaozz:
-1. The keyword here is "...usually are development sites". Also not all developers use localhost for test/local installs.
-1 as well, *.local is becoming more popular. If you want this, you can always add it to your own wp-config.php files.
#3
follow-up:
↓ 5
@
12 years ago
Of course. The aim of a default setting is to be a better default than any other - not to be always correct; otherwise they'd be hard-coded and not settings at all. And changing a default to help many developers is not bad just because it fails to help all of them.
You're both interpreting the significance of the change wrongly. The proposed change just means "if using localhost, then WP_DEBUG = true is a better default than WP_DEBUG = false". It's got no bearing on people NOT using localhost.
#4
@
12 years ago
This doesn't seem like a worthwhile addition to me. It introduces an inconsistent behaviour which can potentially lead to confusion and increase the number of support requests.
WP_DEBUG
is intended for developers. If someone just wants to try out WordPress on localhost for the first time, there's no reason to enforce debug mode for them.
#5
in reply to:
↑ 3
@
12 years ago
Replying to DavidAnderson:
It's got no bearing on people NOT using localhost.
It does have bearing - it makes it just that much more difficult to switch it from false to true or vice versa. -1.
-1. The keyword here is "...usually are development sites". Also not all developers use localhost for test/local installs.