WordPress at a glance

Order of How WordPress Hooks (actions) are Triggered

Action hooks in WordPress are executed not in one moment, but one by one. This order is defined by how action code run in PHP code. Sometimes in order to write correct working code, you need to understand the order of how actions run. On this page, you will find such action-executing order.

Front-end actions

muplugins_loaded
registered_taxonomy
registered_post_type
plugins_loaded
sanitize_comment_cookies
setup_theme
load_textdomain
after_setup_theme
auth_cookie_malformed
auth_cookie_valid
set_current_user
init
widgets_init
register_sidebar
wp_register_sidebar_widget
wp_default_scripts
wp_default_styles
admin_bar_init
add_admin_bar_menus
wp_loaded
parse_request
send_headers
parse_query
pre_get_posts
posts_clauses
posts_selection
wp
template_redirect
get_header
wp_head
wp_enqueue_scripts
wp_print_styles
wp_print_scripts
get_search_form
loop_start
the_post
get_template_part_content
loop_end
get_sidebar
dynamic_sidebar
get_search_form
pre_get_comments
wp_meta
get_footer
get_sidebar
wp_footer
wp_print_footer_scripts
admin_bar_menu
wp_before_admin_bar_render
wp_after_admin_bar_render
shutdown

Admin-side actions

muplugins_loaded
registered_taxonomy
registered_post_type
plugins_loaded
sanitize_comment_cookies
setup_theme
load_textdomain
after_setup_theme
load_textdomain
auth_cookie_valid
set_current_user
init
widgets_init
register_sidebar
wp_register_sidebar_widget
wp_default_scripts
wp_default_styles
admin_bar_init
add_admin_bar_menus
wp_loaded
auth_cookie_valid
auth_redirect
_admin_menu
admin_menu
admin_init
current_screen
load-(page_hook)
send_headers
parse_query
pre_get_posts
posts_clauses
posts_selection
wp
admin_xml_ns
admin_xml_ns
admin_enqueue_scripts
admin_print_styles-(hook_suffix)
admin_print_styles
admin_print_scripts-(hook_suffix)
admin_print_scripts
wp_print_scripts
admin_head-(hook_suffix)
admin_head
adminmenu
in_admin_header
admin_notices
all_admin_notices
(hook)
restrict_manage_posts
the_post
pre_user_query
in_admin_footer
admin_footer
admin_bar_menu
wp_before_admin_bar_render
wp_after_admin_bar_render
admin_print_footer_scripts
admin_footer-(hook_suffix)
shutdown
wp_dashboard_setup