/** * Note: this file exists only to remind developers to build the assets. * For the real index.php that gets built and boots WordPress, * please refer to _index.php. */ /** Define ABSPATH as this file's directory */ if ( ! defined( 'ABSPATH' ) ) { define( 'ABSPATH', __DIR__ . '/' ); } /* * 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 . '/version.php'; require_once ABSPATH . WPINC . '/compat.php'; require_once ABSPATH . WPINC . '/load.php'; // Check for the required PHP version and for the MySQL extension or a database drop-in. wp_check_php_mysql_versions(); // Standardize $_SERVER variables across setups. wp_fix_server_vars(); define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); require_once ABSPATH . WPINC . '/functions.php'; wp_load_translations_early(); // Die with an error message. $die = sprintf( '
%s
', __( 'You are running WordPress without JavaScript and CSS files. These need to be built.' ) ); $die .= '' . sprintf(
/* translators: %s: npm install */
__( 'Before running any build tasks you need to make sure the dependencies are installed. You can install these by running %s.' ),
'npm install
'
) . '
npm run dev
npm run watch
npm run build
' . sprintf( /* translators: 1: npm URL, 2: Handbook URL. */ __( 'This requires npm. Learn more about setting up your local development environment.' ), 'https://www.npmjs.com/get-npm', __( 'https://make.wordpress.org/core/handbook/tutorials/installing-wordpress-locally/' ) ) . '
'; wp_die( $die, __( 'WordPress › Error' ) );