Skip to main content
We are Brand SEO Beijing serving international business, your marketing partner, Contact us by

Website CMS source code interpretation (1)

Map: index.php->wp-blog-header.php->wp-load.php->wp-config.php


Description: Front-end entry, basically no content.
1) Define the WP_USE_THEMES constant, when the constant is defined as false, the site will be displayed as blank; when it is true, it will be displayed normally.

2) Load the wp-blog-header.php file.


Description: Used to load WP environments and templates.
1) Set the $wp_did_header variable, which is equivalent to a flag, to ensure that the wp-blog-header.php file is only executed when it is loaded for the first time.
2) Load the wp-load.php file.
3) Call the wp() function.
4) Load the wp-includes/template-loader.php file


Description: The Bootstrap file is used to set the ABSPATH constant and load the wp-config.php file. wp-config.php will load the wp-settings.php file, which will be used to set up the WP environment.
If the wp-config.php file is not found, an error message will prompt the user to set the wp-config.php file.
wp-load.php will also automatically search the parent folder of WP for the wp-config.php file, so it can protect the WP folder from being exposed.
1) Set the ABSPATH constant to the path to the WP folder.
2) Set the error reporting mode.
3) Load the wp-config.php file (a. load directly, b. load from the parent folder, c. report an error if not found, use the wp_die() function).


Description: WordPress base configuration file.This file contains the following configuration options: MySQL settings, database table name prefixes, keys, WordPress language settings and ABSPATH. For more information, visit MySQL Please consult your space provider for details on setting.This file is used by the installer to automatically generate the wp-config.php configuration file. You can manually copy this file, rename it to wp-config.php, and enter the relevant information.
1) Set the database name, user name, password, database host, database code, database sorting type, database table prefix.
2) Set the identity key for cookie encryption.
3) Set WP language.
4) Set the absolute path ABSPATH of the WordPress directory.
5) Load the wp-settings.php file.
Reprinted in:
Back to Top