WordPress source code interpretation (1), WordPress code

3 minutes
two hundred and thirty-one
zero

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

index.php:

Description: Front end entrance, basically without content.

1) Define the WP_USE_THEMES constant. When the constant is defined as false, the site will be blank; If it is true, it will display normally.

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

wp-blog-header.php:

Description: Used to load the WP environment 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

wp-load.php:

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 establish the WP environment.

If the wp-config.php file cannot be found, an error message will be prompted asking the user to set the wp-config.php file.

Wp-load.php will also automatically search the WP's parent folder 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 it cannot be found, and use the wp_die() function).

wp-config.php:

Description: WordPress basic configuration file. This file contains the following configuration options: MySQL settings, database table name prefix, key, WordPress language settings, and ABSPATH For more information, visit // codex.wordpress.org/Edi ting_wp-config.php

Please consult your space provider for MySQL settings. 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 then enter the relevant information.

1) Set the database name, user name, password, database host, database code, database collation type, and database table prefix.

2) Set the identity key for cookie encryption.

3) Set the WP language.

4) Set the absolute path ABSPATH of the WordPress directory.

5) Load the wp-settings.php file.

This article is written by: Chief Editor Published on Software Development of Little Turkey , please indicate the source for reprinting: //hongchengtech.cn/blog/1441.html
Kuke_WP editor
author

Related recommendations

1 year ago (2024-02-20)

Industry Fit! Preferred element of WMS warehouse management system, wms warehouse software

Enterprise managers often think that warehouses are inefficient, high cost places, and belong to heavy asset operations. With the development of enterprise business, if the warehouse needs to be expanded in traditional ways, the cost is relatively high. At the same time, it also faces problems such as lack of operating experience. In the operation link, the process of warehouse, allocation, human resource matching and management is very complicated, and the team's professional ability is also highly required
seven hundred and eighty-three
zero
1 year ago (2024-02-19)

Supply chain billing system management (I): system overview, what are the supply chain management fees

In recent years, with the continuous development of e-commerce industry and increasing business, everyone has started to distribute goods online, and the supply chain billing system needs to manage more and more things. How to manage the billing system? The author summarizes some contents about settlement based on his own practical experience, hoping to enlighten you. After working on the warehouse management system for several years, I was transferred to work as a supplier
five hundred and fifty-six
zero
1 year ago (2024-02-19)

Multi merchant system management - store background design, what is the meaning of multi merchant classification

Simply understood, multi merchants are a large mall. The platform can manage merchants who settle in the mall. The merchants who settle in the mall have independent backstage. They can log in and add goods to the shelves by themselves, manage stores by themselves and other information functions. Then how to design the backstage of the store? Let's see the author's sharing. I hope it can help you. 1、 Introduction The backstage of the store is an important part of the e-commerce platform
six hundred and forty-eight
zero
1 year ago (2024-02-19)

Jiangyang District of Luzhou City took the lead in the city's full coverage training on domestic waste classification management regulations, Luzhou waste treatment

Source: Original Draft On January 10, the People's Congress of Jiangyang District, Luzhou City and the District Government jointly carried out a training on the regulations of the Regulations on the Classified Management of Domestic Waste in Luzhou City (the Regulations for short), and invited Lei Zhengyun, the chairman of the Legislative Affairs Committee of the Municipal People's Congress, to give a live lecture, so as to guide the comprehensive and systematic grasp of the contents and legal functions and responsibilities of the Regulations, deeply understand the specific specifications of the Regulations, and quickly set off
three hundred and seventeen
zero
1 year ago (2024-02-19)

Simeng CMS (smcms) content management system, Simeng Central Primary School

SMCMS (Simon CMS) is a content management system developed based on the microbee http rapid development framework. Product development follows the concept of simplicity, security, high concurrency and efficiency. Enterprise level web content management software for high-end users is designed to help users solve the increasingly complex and important web content creation, maintenance, publishing and response
three hundred and sixty-one
zero
1 year ago (2024-02-19)

Does the website have to install a content management system?, What apps are needed to install software on the website

1: The role of the website is to let companies or enterprises display their own windows, but also to let more customers or potential customers know their work and products. Through the website, customers can understand their products and services more intuitively, and can also provide more services to meet customer needs. 2: The role of the content management system The content management system can help
four hundred and fifty-six
zero

comment

0 people have participated in the review

Scan code to add WeChat

contact us

WeChat: Kuzhuti
Online consultation: