diff --git a/src/index.php b/src/index.php index 0714b3beda..e5e130d105 100644 --- a/src/index.php +++ b/src/index.php @@ -11,13 +11,16 @@ if ( ! defined( 'ABSPATH' ) ) { define( 'ABSPATH', __DIR__ . '/' ); } -define( 'WPINC', 'wp-includes' ); - -if ( file_exists( ABSPATH . WPINC . '/js/dist/edit-post.js' ) ) { +/* + * Load the actual index.php file if the assets were already built. + * Note: WPINC is not defined yet, it is defined later in wp-settings.php. + */ +if ( file_exists( ABSPATH . 'wp-includes/js/dist/edit-post.js' ) ) { require_once ABSPATH . '_index.php'; return; } +define( 'WPINC', 'wp-includes' ); require_once ABSPATH . WPINC . '/load.php'; // Standardize $_SERVER variables across setups.