https://codex.wordpress.org/Query_Overview
https://web.archive.org/web/20170524181634/http://humanshell.net/2011/08/wordpress-initialization
All http query to the webserver are send to index.php (this is not a redirect as the rule don’t use the redirect flag [R]) in the root folder. The redirect occurs in .htaccess with mod_rewrite
mod_rewrite operate by using a PCRE* regular expression
*PCRE: Perl Compatible Regular Expression
This operation retains the original URI that can be requested with $_server[‘REQUEST_URI’]
Below is the cascade of file that are succesfully called from index.php (up the 5th level but it needs to be expanded)
index.php
set the constant ‘WP_USE_THEMES’ to true and require wp-blog-header.php
wp-blog-header.php
execute wp(). This function is defined in functions.php
requires wp-load.php and template-loader.php
wp-load.php AND template-loader.php
wp-load.php requires wp-config.php
wp-load.php set the constant ‘ABSPATH’
wp-config.php requires wp-settings.php
wp-settings.php
requires:
- version.php
- load.php
- class-wp-paused-extensions-storage.php
- class-wp-fatal-error-handler.php
- class-wp-reccovery-mode-cookie-service.php
- class-wp-recovery-mode-key-service.php
- class-wp-recovery-mode-link-service.php
- class-wp-recovery-mode-email-service.php
- class-wp-recovery-mode.php
- error-protection.php
- default-constant.php
- plugin.php
and also:
- compat.php
- class-wp-list-util.php
- formatting.php
- meta.php
- functions.php
- class-wp-meta-query.php
- class-wp-matchesmapregex.php
- class-wp.php
- class-wp-error.php
- pomo/mo.php
and most of wordpress as well:
- class-wp-walker.php
- class-wp-ajax-response.php
- capabilities.php
- class-wp-roles.php
- class-wp-role.php
- class-wp-user.php
- class-wp-query.php
- query.php
- class-wp-date-query.php
- theme.php
- class-wp-theme.php
- template.php
- class-wp-user-query.php
- class-wp-session-tokens.php
- class-wp-user-meta-sessions-tokens.php
- class-wp-metadata-session-tokens.php
- class-wp-metadata-lazyloader.php
- general-template.php
- link-template.php
- author-template.php
- post.php
- class-walker-page.php
- class-walker-page-dropdown.php
- class-wp-post-type.php
- class-wp-post.php
- post-template.php
- revision.php
- post-formats.php
- post-thumbnail-template.php
- category.php
- class-walker-category.php
- class-walker-category-dropdown.php
- category-template.php
- comment.php
- class-wp-comment.php
- class-wp-comment-query.php
- class-walker-comment.php
- comment-template.php
- rewrite.php
- class-wp-rewrite.php
- feed.php
- bookmark.php
- bookmark-template.php
- kses.php
- cron.php
- deprecated.php
- script-loader.php
- taxonomy.php
- class-wp-taxonomy.php
- class-wp-term.php
- class-wp-term-query.php
- class-wp-tax-query.php
- update.php
- canonical.php
- shortcodes.php
- embed.php
- class-wp-embed.php
- class-wp-oembed.php
- class-wp-oembed-controller.php
- media.php
- http.php
- class-http.php
- class-wp-http-streams.php
- class-wp-http-curl.php
- class-wp-http-proxy.php
- class-wp-http-cookie.php
- class-wp-http-encoding.php
- class-wp-http-response.php
- class-wp-http-requests-response.php
- class-wp-http-requests-hooks.php
- widgets.php
- class-wp-widget.php
- class-wp-widget-factory.php
- nav-menu.php
- nav-menu-template.php
- admin-bar.php
- rest-api.php
- rest-api/class-wp-rest-server.php
- rest-api/class-wp-rest-response.php
- rest-api/class-wp-rest-request.php
- rest-api/endpoints/class-wp-rest-controller.php
- rest-api/endpoints/class-wp-rest-posts-controller.php
- rest-api/endpoints/class-wp-rest-attachments-controller.php
- rest-api/endpoints/class-wp-rest-post-types-controller.php
- rest-api/endpoints/class-wp-rest-post-statuses-controller.php
- rest-api/endpoints/class-wp-rest-revisions-controller.php
- rest-api/endpoints/class-wp-rest-autosaves-controller.php
- rest-api/endpoints/class-wp-rest-taxonomies-controller.php
- rest-api/endpoints/class-wp-rest-terms-controller.php
- rest-api/endpoints/class-wp-rest-users-controller.php
- rest-api/endpoints/class-wp-rest-comments-controller.php
- rest-api/endpoints/class-wp-rest-search-controller.php
- rest-api/endpoints/class-wp-rest-blocks-controller.php
- rest-api/endpoints/class-wp-rest-block-renderer-controller.php
- rest-api/endpoints/class-wp-rest-settings-controller.php
- rest-api/endpoints/class-wp-rest-themes-controller.php
- rest-api/fields/class-wp-rest-meta-fields.php
- rest-api/fields/class-wp-rest-comment-meta-fields.php
- rest-api/fields/class-wp-rest-post-meta-fields.php
- rest-api/fields/class-wp-rest-term-meta-fields.php
- rest-api/fields/class-wp-rest-user-meta-fields.php
- rest-api/search/class-wp-rest-search-handler.php
- rest-api/search/class-wp-rest-post-search-handler.php
- class-wp-block-type.php
- class-wp-block-styles-registry.php
- class-wp-block-type-registry.php
- class-wp-block-parser.php
- blocks.php
- blocks/archives.php
- blocks/block.php
- blocks/calendar.php
- blocks/categories.php
- blocks/latest-comments.php
- blocks/latest-posts.php
- blocks/rss.php
- blocks/search.php
- blocks/shortcode.php
- blocks/social-link.php
- blocks/tag-cloud.php