Support » Fixing WordPress » STRANGE: including wp-blog-header.php takes ~ 15 seconds

  • Hi everyone, today I notice that my website was too slow for no reason apparently.
    I did a quick debug and I “found” the first problem.

    Every time I include wp-blog-header.php it taked ~ 15s

    $time1 = time();
    $time2 = time();
    $total = $time2 – $time1;
    error_log(“time:$total”); //outputs “time:15”

    What could be wrong? how can i debug this problem?


Viewing 3 replies - 1 through 3 (of 3 total)
  • Well a tons of things could have gone wrong because that file quite completely handles/is the full wordpress.

    You already did the first step to debug your problem, you choosed a simple form of code profiling by calculating the execution time.

    Now you only need to find out which part inside /blog/wp-blog-header.php takes such a long time. But before you write error_logging code inside everywhere, take a look at xdebug it provides a set of open source tools for php code profiling. you can start profiling with xdebug_start_profiling() and at the end you can output an overview with xdebug_dump_function_trace().

    I hope this is helpfull for you.

    problem solved. No wordpress problem. It was DNS problems.


    nice to read you figured it out cmancre1. Would you please be so kind and mark the thread as resovled? Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘STRANGE: including wp-blog-header.php takes ~ 15 seconds’ is closed to new replies.