How do I display database query statistics on Wordpress site?

后端 未结 3 1045
[愿得一人]
[愿得一人] 2021-02-07 10:54

I\'ve noticed that a few Wordpress blogs have query statistics present in their footer that simply state the number of queries and the total time required to process them for th

3条回答
  •  再見小時候
    2021-02-07 11:42

    wordpress has a easy solution now

    There is a function called get_num_queries() and as specified in other answers timer_stop().

     in 

    get_num_queries() - returns the number of database queries during the WordPress execution and accepts no parameters

提交回复
热议问题