wp-load.php
Purpose
Bootstraps WordPress by defining ABSPATH and loading wp-config.php, which then loads wp-settings.php. If no config exists, it initiates the setup flow.
Flow
- Defines
ABSPATHto the WordPress root if not already defined. - Initializes a baseline
error_reporting()level. - Loads
wp-config.phpfrom the root, or one directory above if present and not another install. - If no config is found:
- Loads minimal core (
version.php,compat.php,load.php). - Runs
wp_check_php_mysql_versions()andwp_fix_server_vars(). - Loads
functions.php, computes setup URL, and redirects tosetup-config.php. - Loads early translations and exits with
wp_die()messaging.
- Loads minimal core (
Key functions called
wp_check_php_mysql_versions()wp_fix_server_vars()wp_guess_url()wp_load_translations_early()wp_die()
Hooks fired
- None directly in this file.