TTFB too high, 1 sec load time for single file with phpinfo();

Posted June 16, 2017 11.9k views
Server OptimizationWordPressPHP FrameworksUbuntu 16.04

Our wordpress site is showing Quite big TTFB , i created blank file with phpinfo() and loaded the website and it is the same TTFB of 1sec, so iguess wordpress is not slowing , something else on our server must be doing this

what part of server i should be optimizing?

i am running Ubuntu 64 bit with httpd , php-FPM and mysql.

1 comment
  • ran another test

    1) wp loads with 1 sec of load time
    2) a file with phpinfo also loads with same wait time
    3) html file loads with 800ms of load time.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers


TTFB can be affected by most areas of your stack, ranging from DNS to the Web Server, PHP to the database server, and everything the falls between.

Reducing TTFB can generally be achieved by implementing some form of caching and using a CDN. I would recommend either WP Super Cache or W3 Total Cache (the more complex of the two).

If you want super-simple, use WP Super Cache.

As far as a CDN, you have numerous options, though I’d start with CloudFlare as it’s free and rather easy to setup.

The physical stack can also come in to play, so making such your web server, whether it’s Apache or NGINX – the database server, whether MySQL, MariaDB, or Percona – and PHP (where possible) is optimized and tuned is definitely critical. WordPress relies on PHP and MySQL heavily, so beyond any sort of caching, making sure the database server is tuned for the best possible performance is going to be an absolute must.

I would start by setting up CloudFlare and getting one (and only one) of those caching plugins setup. Once you have, re-test and see where you’re at and we can troubleshoot from there.

Feel free to tag me in your reply by using @jtittle.

thanks for the reply @jittle but now my concern is TTFB for a plain html file. once slow TTFB request goes through, everything loads quite fast and whole website loads in under 5 secs as i have Cloudflare and Caching on.

just ran a TTFB test on my other client hosted on godaddy’s readme.html file , it loaded in under 200ms.

so i guess something is wrong with my server config and i need assistance finding out how to find it out. been going over many articles over web from morning, most of apache’s recommendation seem to be of old version . nothing seem to help.

  • Hi @lalitnagrath

    You should only use the CloudFlare DNS - otherwise every request to your site will go through CloudFlare. So if you use the cache on CloudFlare, then your TTFB will be longer than if you connected directly.
    CloudFlare even wrote a blog post about this:

    To do a real test, use your droplets IP to view a file - that way you’ll skip any DNS, CloudFlare caching, etc. from external sources and only focus on your droplets configuration. Example: http://your-droplet-ip/phpinfo.php