WordPress.org

Make WordPress Core

Opened 11 months ago

Last modified 9 months ago

#24501 new enhancement

Request Allow Search Engines to Index this Site Option Turned Off By Default for Developers

Reported by: bftrick Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version:
Component: Upgrade/Install Keywords: has-patch
Focuses: Cc:

Description

Theme & Plugin developers often create test sites which shouldn't be indexed by search engines. I propose that we turn off that option by default when a user creates a new site with the WP_DEBUG option enabled.

The way this would work is that when a new user sets up a site they would have to first set WP_DEBUG to true in the wp-config.php file. Then when they go to the wp-admin/install.php page the Allow search engines to index this site checkbox would be turned off by default.

If a user doesn't change the WP_DEBUG setting the checkbox would be checked by default (this is how it works currently).

Since regular users are cautioned against changing the WP_DEBUG setting I see no reason not to make developers lives a little easier.

Attachments (1)

install.diff (538 bytes) - added by bftrick 11 months ago.

Download all attachments as: .zip

Change History (4)

bftrick11 months ago

comment:1 bftrick11 months ago

  • Keywords has-patch added

comment:2 bpetty10 months ago

Seems like a good idea to me with a simple approach.

comment:3 nacin9 months ago

I don't know if WP_DEBUG is the right indicator here, unfortunately. It means "debug mode" but more broadly it means "show notices and other errors" — which, if configured with WP_DEBUG_DISPLAY and proper error logging, is perfectly acceptable in a production environment.

Changing this checkbox based on a hidden algorithm is probably a bit jarring. If you set up test sites a lot (which plugin/theme developers likely do), unchecking the box is second nature. If you *don't* set up sites a lot, then unchecking the box isn't repetitively annoying.

I think a production site not being crawled when it should be crawled is worse than a test site being crawled when it shouldn't be. (If you don't want it to be public, don't put it on the internet.) Changing this toggle could result in more sites not being crawled when they should be.

I'd imagine a lot of theme/plugin developers set up local or VM sites for testing. One thing we *could* do is for 'localhost', just hide the checkbox entirely (and set blog_public to 0). Doesn't cover a lot of bases, but you'd never want 'localhost' to be crawled, obviously. Of course, it also has no effect — Google ain't gonna start crawling your local webserver.

I'd think wontfix here.

Note: See TracTickets for help on using tickets.