-// Change to E_ALL for development/debugging
-error_reporting(E_ALL ^ E_NOTICE);
-
-// For an advanced caching plugin to use, static because you would only want one
-if ( defined('WP_CACHE') )
- require (ABSPATH . 'wp-content/advanced-cache.php');
-
-define('WPINC', 'wp-includes');
-require_once (ABSPATH . WPINC . '/wp-db.php');
-
-// Table names
-$wpdb->posts = $table_prefix . 'posts';
-$wpdb->users = $table_prefix . 'users';
-$wpdb->categories = $table_prefix . 'categories';
-$wpdb->post2cat = $table_prefix . 'post2cat';
-$wpdb->comments = $table_prefix . 'comments';
-$wpdb->links = $table_prefix . 'links';
-$wpdb->linkcategories = $table_prefix . 'linkcategories';
-$wpdb->options = $table_prefix . 'options';
-$wpdb->postmeta = $table_prefix . 'postmeta';
-$wpdb->usermeta = $table_prefix . 'usermeta';
-
-$wpdb->prefix = $table_prefix;
-
-if ( defined('CUSTOM_USER_TABLE') )
- $wpdb->users = CUSTOM_USER_TABLE;
-if ( defined('CUSTOM_USER_META_TABLE') )
- $wpdb->usermeta = CUSTOM_USER_META_TABLE;
-
-// We're going to need to keep this around for a few months even though we're not using it internally
-
-$tableposts = $wpdb->posts;
-$tableusers = $wpdb->users;
-$tablecategories = $wpdb->categories;
-$tablepost2cat = $wpdb->post2cat;
-$tablecomments = $wpdb->comments;
-$tablelinks = $wpdb->links;
-$tablelinkcategories = $wpdb->linkcategories;
-$tableoptions = $wpdb->options;
-$tablepostmeta = $wpdb->postmeta;
-
-if ( file_exists(ABSPATH . 'wp-content/object-cache.php') )
- require (ABSPATH . 'wp-content/object-cache.php');
-else
- require (ABSPATH . WPINC . '/cache.php');
-
-// To disable persistant caching, add the below line to your wp-config.php file, uncommented of course.
-// define('DISABLE_CACHE', true);
-
-wp_cache_init();
-
-require (ABSPATH . WPINC . '/functions.php');
-require (ABSPATH . WPINC . '/default-filters.php');
-require_once (ABSPATH . WPINC . '/wp-l10n.php');
-
-$wpdb->hide_errors();
-$db_check = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl'");
-if ( !$db_check && (!strstr($_SERVER['PHP_SELF'], 'install.php') && !defined('WP_INSTALLING')) ) {
- if ( strstr($_SERVER['PHP_SELF'], 'wp-admin') )
- $link = 'install.php';
- else
- $link = 'wp-admin/install.php';
- die(sprintf(__("It doesn't look like you've installed WP yet. Try running <a href='%s'>install.php</a>."), $link));
+// Check if we're in WP_DEBUG mode.
+wp_debug_mode();
+
+// For an advanced caching plugin to use. Uses a static drop-in because you would only want one.
+if ( WP_CACHE )
+ WP_DEBUG ? include( WP_CONTENT_DIR . '/advanced-cache.php' ) : @include( WP_CONTENT_DIR . '/advanced-cache.php' );
+
+// Define WP_LANG_DIR if not set.
+wp_set_lang_dir();
+
+// Load early WordPress files.
+require( ABSPATH . WPINC . '/compat.php' );
+require( ABSPATH . WPINC . '/functions.php' );
+require( ABSPATH . WPINC . '/class-wp.php' );
+require( ABSPATH . WPINC . '/class-wp-error.php' );
+require( ABSPATH . WPINC . '/plugin.php' );
+
+// Include the wpdb class and, if present, a db.php database drop-in.
+require_wp_db();
+
+// Set the database table prefix and the format specifiers for database table columns.
+wp_set_wpdb_vars();
+
+// Start the WordPress object cache, or an external object cache if the drop-in is present.
+wp_start_object_cache();
+
+// Load early WordPress files.
+require( ABSPATH . WPINC . '/default-filters.php' );
+require( ABSPATH . WPINC . '/pomo/mo.php' );
+
+// Initialize multisite if enabled.
+if ( is_multisite() ) {
+ require( ABSPATH . WPINC . '/ms-blogs.php' );
+ require( ABSPATH . WPINC . '/ms-settings.php' );
+} elseif ( ! defined( 'MULTISITE' ) ) {
+ define( 'MULTISITE', false );