Edit File by line
/home/zeestwma/redstone...
File: wp-load.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Bootstrap file for setting the ABSPATH constant
[2] Fix | Delete
* and loading the wp-config.php file. The wp-config.php
[3] Fix | Delete
* file will then load the wp-settings.php file, which
[4] Fix | Delete
* will then set up the WordPress environment.
[5] Fix | Delete
*
[6] Fix | Delete
* If the wp-config.php file is not found then an error
[7] Fix | Delete
* will be displayed asking the visitor to set up the
[8] Fix | Delete
* wp-config.php file.
[9] Fix | Delete
*
[10] Fix | Delete
* Will also search for wp-config.php in WordPress' parent
[11] Fix | Delete
* directory to allow the WordPress directory to remain
[12] Fix | Delete
* untouched.
[13] Fix | Delete
*
[14] Fix | Delete
* @package WordPress
[15] Fix | Delete
*/
[16] Fix | Delete
[17] Fix | Delete
/** Define ABSPATH as this file's directory */
[18] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[19] Fix | Delete
define( 'ABSPATH', __DIR__ . '/' );
[20] Fix | Delete
}
[21] Fix | Delete
[22] Fix | Delete
/*
[23] Fix | Delete
* The error_reporting() function can be disabled in php.ini. On systems where that is the case,
[24] Fix | Delete
* it's best to add a dummy function to the wp-config.php file, but as this call to the function
[25] Fix | Delete
* is run prior to wp-config.php loading, it is wrapped in a function_exists() check.
[26] Fix | Delete
*/
[27] Fix | Delete
if ( function_exists( 'error_reporting' ) ) {
[28] Fix | Delete
/*
[29] Fix | Delete
* Initialize error reporting to a known set of levels.
[30] Fix | Delete
*
[31] Fix | Delete
* This will be adapted in wp_debug_mode() located in wp-includes/load.php based on WP_DEBUG.
[32] Fix | Delete
* @see https://www.php.net/manual/en/errorfunc.constants.php List of known error levels.
[33] Fix | Delete
*/
[34] Fix | Delete
error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
[35] Fix | Delete
}
[36] Fix | Delete
[37] Fix | Delete
/*
[38] Fix | Delete
* If wp-config.php exists in the WordPress root, or if it exists in the root and wp-settings.php
[39] Fix | Delete
* doesn't, load wp-config.php. The secondary check for wp-settings.php has the added benefit
[40] Fix | Delete
* of avoiding cases where the current directory is a nested installation, e.g. / is WordPress(a)
[41] Fix | Delete
* and /blog/ is WordPress(b).
[42] Fix | Delete
*
[43] Fix | Delete
* If neither set of conditions is true, initiate loading the setup process.
[44] Fix | Delete
*/
[45] Fix | Delete
if ( file_exists( ABSPATH . 'wp-config.php' ) ) {
[46] Fix | Delete
[47] Fix | Delete
/** The config file resides in ABSPATH */
[48] Fix | Delete
require_once ABSPATH . 'wp-config.php';
[49] Fix | Delete
[50] Fix | Delete
} elseif ( @file_exists( dirname( ABSPATH ) . '/wp-config.php' ) && ! @file_exists( dirname( ABSPATH ) . '/wp-settings.php' ) ) {
[51] Fix | Delete
[52] Fix | Delete
/** The config file resides one level above ABSPATH but is not part of another installation */
[53] Fix | Delete
require_once dirname( ABSPATH ) . '/wp-config.php';
[54] Fix | Delete
[55] Fix | Delete
} else {
[56] Fix | Delete
[57] Fix | Delete
// A config file doesn't exist.
[58] Fix | Delete
[59] Fix | Delete
define( 'WPINC', 'wp-includes' );
[60] Fix | Delete
require_once ABSPATH . WPINC . '/version.php';
[61] Fix | Delete
require_once ABSPATH . WPINC . '/compat.php';
[62] Fix | Delete
require_once ABSPATH . WPINC . '/load.php';
[63] Fix | Delete
[64] Fix | Delete
// Check for the required PHP version and for the MySQL extension or a database drop-in.
[65] Fix | Delete
wp_check_php_mysql_versions();
[66] Fix | Delete
[67] Fix | Delete
// Standardize $_SERVER variables across setups.
[68] Fix | Delete
wp_fix_server_vars();
[69] Fix | Delete
[70] Fix | Delete
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
[71] Fix | Delete
require_once ABSPATH . WPINC . '/functions.php';
[72] Fix | Delete
[73] Fix | Delete
$path = wp_guess_url() . '/wp-admin/setup-config.php';
[74] Fix | Delete
[75] Fix | Delete
// Redirect to setup-config.php.
[76] Fix | Delete
if ( ! str_contains( $_SERVER['REQUEST_URI'], 'setup-config' ) ) {
[77] Fix | Delete
header( 'Location: ' . $path );
[78] Fix | Delete
exit;
[79] Fix | Delete
}
[80] Fix | Delete
[81] Fix | Delete
wp_load_translations_early();
[82] Fix | Delete
[83] Fix | Delete
// Die with an error message.
[84] Fix | Delete
$die = '<p>' . sprintf(
[85] Fix | Delete
/* translators: %s: wp-config.php */
[86] Fix | Delete
__( "There doesn't seem to be a %s file. It is needed before the installation can continue." ),
[87] Fix | Delete
'<code>wp-config.php</code>'
[88] Fix | Delete
) . '</p>';
[89] Fix | Delete
$die .= '<p>' . sprintf(
[90] Fix | Delete
/* translators: 1: Documentation URL, 2: wp-config.php */
[91] Fix | Delete
__( 'Need more help? <a href="%1$s">Read the support article on %2$s</a>.' ),
[92] Fix | Delete
__( 'https://developer.wordpress.org/advanced-administration/wordpress/wp-config/' ),
[93] Fix | Delete
'<code>wp-config.php</code>'
[94] Fix | Delete
) . '</p>';
[95] Fix | Delete
$die .= '<p>' . sprintf(
[96] Fix | Delete
/* translators: %s: wp-config.php */
[97] Fix | Delete
__( "You can create a %s file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file." ),
[98] Fix | Delete
'<code>wp-config.php</code>'
[99] Fix | Delete
) . '</p>';
[100] Fix | Delete
$die .= '<p><a href="' . $path . '" class="button button-large">' . __( 'Create a Configuration File' ) . '</a></p>';
[101] Fix | Delete
[102] Fix | Delete
wp_die( $die, __( 'WordPress &rsaquo; Error' ) );
[103] Fix | Delete
}
[104] Fix | Delete
[105] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function