Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#30935 closed enhancement (fixed)

Explain check for ../wp-settings.php when getting ../wp-config.php

Reported by: mattheweppelsheimer Owned by: DrewAPicture
Priority: normal Milestone: 4.2
Component: Bootstrap/Load Version: 4.2
Severity: normal Keywords: has-patch
Cc: Focuses: docs

Description

In wp-load.php, when searching for wp-config.php in the parent directory, we abort if wp-settings.php is also in the parent directory. The reason isn't super clear.

Attachments (1)

30935.diff​ (719 bytes ) - added by mattheweppelsheimer 12 years ago.
explain check for wp-settings.php in parent before loading wp-config.php in parent

Download all attachments as: .zip

Change History (6)

@mattheweppelsheimer
12 years ago

explain check for wp-settings.php in parent before loading wp-config.php in parent

#1 @mattheweppelsheimer
12 years ago

  • Keywords has-patch added

Patch adds the following docs to explain:

/*
 * Only get wp-config.php from the parent directory
 * if wp-settings.php is not also in the parent directory, to
 * avoid cases where the current directory is a nested
 * installation, e.g. / is WordPressA and /blog/ is WordPressB.
 */
Last edited 12 years ago by mattheweppelsheimer (previous) (diff)

#2 @mattheweppelsheimer
12 years ago

And thank you @dd32 for clarifying the reason for me.

This ticket was mentioned in ​Slack in #core by mattheweppelsheimer. ​View the logs.


12 years ago

#4 @DrewAPicture
12 years ago

  • Milestone Awaiting Review → 4.2

#5 @DrewAPicture
12 years ago

  • Owner set to DrewAPicture
  • Resolution → fixed
  • Status new → closed

In 31463:

Add inline documentation to clarify the reasoning behind the various conditions that control how WP is loaded.

Props mattheweppelsheimer for the initial patch.
Fixes #30935.

Note: See TracTickets for help on using tickets.