• cmancre1

    (@cmancre1)


    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

    <?php
    $time1 = time();
    require(‘../blog/wp-blog-header.php’);
    $time2 = time();
    $total = $time2 – $time1;
    error_log(“time:$total”); //outputs “time:15”
    ?>

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

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • hakre

    (@hakre)

    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 http://xdebug.org/ 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.

    Thread Starter cmancre1

    (@cmancre1)

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

    Thanks

    hakre

    (@hakre)

    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.