There’s a great visual guide outlining the core loading order in WordPress over on WordPress Answers on StackExchange, developed by Rarst, a longtime contributor in the WordPress community.
This is important information for those that want to understand the basic workings of WordPress. Consider the screenshot below from Rarst’s visual guide.
This shows that active plugins are loaded before the code in a theme’s functions.php file. As a result, a plugin that attempts to modify behavior that’s included in that theme’s
functions.php likely won’t work as expected. The code in
functions.php will be executed after the plugin executes and will likely undo whatever the plugin set out to do.
Understanding the sequence of events that take place to load a WordPress site can help you to debug problems that occur.