-1

To mesure performance of a wordpress website i need what is the first filter or action executed by wordpress ? it seems that index.php is the input file of server, there is a way to add a global time variable Programmatically by editing this file when a plugin is installed and add this line:

 $timezone = date_default_timezone_get();
 define( 'REQUEST_RECEIVED_TIME', $timezone );
3
  • 1
    Does this answer your question? What is the very earliest action hook you can call? Commented Jun 30, 2020 at 14:16
  • no it give the hook but for performance there is other stuff before hooks
    – Gogo
    Commented Jun 30, 2020 at 17:29
  • You asked what the earliest hook was. That question has the answer. If that’s not what you need then you should ask your actual question. Commented Jul 1, 2020 at 2:05

1 Answer 1

2

Here is nicely described what and when is loading and why. I recommend also this awesome plugin Query Monitor that helped me also to fix performance issues.

in short:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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