Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions src/wp-admin/setup-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,6 @@

nocache_headers();

// Support wp-config-sample.php one level up, for the develop repo.
if ( file_exists( ABSPATH . 'wp-config-sample.php' ) ) {
$config_file = file( ABSPATH . 'wp-config-sample.php' );
} elseif ( file_exists( dirname( ABSPATH ) . '/wp-config-sample.php' ) ) {
$config_file = file( dirname( ABSPATH ) . '/wp-config-sample.php' );
} else {
wp_die(
sprintf(
/* translators: %s: wp-config-sample.php */
__( 'Sorry, I need a %s file to work from. Please re-upload this file to your WordPress installation.' ),
'<code>wp-config-sample.php</code>'
)
);
}

// Check if wp-config.php has been created.
if ( file_exists( ABSPATH . 'wp-config.php' ) ) {
wp_die(
Expand All @@ -81,6 +66,21 @@
);
}

// Support wp-config-sample.php one level up, for the develop repo.
if ( file_exists( ABSPATH . 'wp-config-sample.php' ) ) {
$config_file = file( ABSPATH . 'wp-config-sample.php' );
} elseif ( file_exists( dirname( ABSPATH ) . '/wp-config-sample.php' ) ) {
$config_file = file( dirname( ABSPATH ) . '/wp-config-sample.php' );
} else {
wp_die(
sprintf(
/* translators: %s: wp-config-sample.php */
__( 'Sorry, I need a %s file to work from. Please re-upload this file to your WordPress installation.' ),
'<code>wp-config-sample.php</code>'
)
);
}

$step = isset( $_GET['step'] ) ? (int) $_GET['step'] : -1;

/**
Expand Down
Loading