Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

So like wp must load series of files from,

index.php -> ... -> wp-header.php -> ... ->functions.php

...and so on upon execution.

Also there must be a similar flowchart for functions callings, conditionals and such during the execution. Is such a flowchart(s) available anywhere?

share|improve this question

4 Answers 4

up vote 15 down vote accepted

In addition to the link provided by Rohit Pande,

There is also these rather in-depth explanation found at,

Part 1

http://theme.fm/2011/09/wordpress-internals-how-wordpress-boots-up-2315/

Part 2

http://theme.fm/2011/09/wordpress-internals-how-wordpress-boots-up-part-2-2437/

Which also includes some diagrams/flowcharts.

enter image description here

and...

enter image description here

This is also just the start of understanding the WordPress initialization process to which also should include information about the template hierarchy, as well as inspecting which hooks are fired on which pages and when. Combined together you can develop a pretty deep understanding of what's going on and where!


Or this flow chart from Rarst as seen in this question

enter image description here


Run your own backtraces....

enter image description here

How...?

  1. http://www.php.net/manual/en/function.debug-backtrace.php
  2. http://queryposts.com/function/wp_debug_backtrace_summary/

...in their most basic form.

More...

I can not vouch for the above four links specifically, however they are additional material which supports this question that you or others may find useful.


Even more...

Want to see what actions get fired during a request? Take a look at this plugin by Toscho,

enter image description here

Want to see what's hooked and where with what priority? Take a look at this plugin by Rarst,

enter image description here

Very handy for when wanting to know where internal and custom hooks are within the priority chain.

And there's also this plugin by Kaiser,

Only one screenshot of several, rest can be found on GitHub Repo link

enter image description here


There's also this flow chart explaining the query process and what to use when which will help compliment this question,

Original source question and answer here, flow chart by Rarst.

This flowchart and Q&A I can vouch for.

enter image description here

(clicking the image will take you directly to that Q&A thread for more information).


NOTE

Its one thing to look at a flow chart, which is very useful with regards to the visualizing the initialization process and the above links to that topic do some justice but as a WordPress developer, once you're in the thick of things "developing", you want to make use of other debugging tools that help you visualize and understand whats happening during some of these requests. I believe all that's mentioned above go hand in hand.

These are not the ONLY tools that are available, nor the only methods for getting valuable data during initialization/request processes but they are a selection of what I use. Feel free to add more!

#changelog: 04/10/12 added flow chart from Rarst / "Make sense of WP core load"

share|improve this answer

Not exactly the diagrammatic view but I can provide you the description view like this. Try out. This might be helpful for your question.

share|improve this answer

I've always found this template hierarchy pretty handy:

WordPress Template Hierarchy

share|improve this answer

I suppose that the service Recognizer help you. It builds a sequence diagram of the Xdebug debugger trace log, which displays the order of calls, arguments, the line where the call came ...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.