Make sense of WordPress core load

WordPress functionality is usually taken for granted (as it should be), but that makes a little obscure how do you actually get that loaded and ready to use. I felt for a while that I needed better grasp on core load process. Recently I have wandered on WP include stack illustration by Andy Skelton and liked the concept.

On other hand I felt it omitted some parts I am interested in. Since my last query functions chart was quite a success, I decided to try to chart one for loading process.

This is by no means exhaustive (no image could contain that much). Instead I have tried to focus on important stages, differences between front- and back-end, as well as highly important load of extensions (plugins and theme).

WordPress core load

Still turned out a little crowded, but sure beats digging for order of those important hooks in source every time.

Related Posts

6 Comments

  • I like how wp-load and admin_init span columns. Clever!

  • @Andy Skelton

    Yeah, turned out nice. I started on front-end alone, but really wanted to differentiate it with admin and Ajax so they crawled from the side soon.

  • Very nice. I find anything that helps me remember the order of actions is great. I also like the inclusion of the “bubbles” letting you know what is safe.

  • @Zack

    Yep, load process is quite rich with hooks, but very few of these should normally be used. Doing stuff before init and trying to use conditionals before template_redirect are very common mistakes.

  • Hey Rarst, do you mind if I copy the WP Core Load image and display it in the documentation for my WordPress Theme? I think it’ll really help my child theme developers.

    I will credit you by saying it was “Created by Rarst”.

    – Jim

Comments are closed.