Long time to load - problem with TTFB

Hi, I’m looking for help.
Here is test result: WebPageTest - Running web page performance and optimization tests...

For now I have made opt. for my apache server and still the same. Apache 2.4 , PHP-FPM 5.6, MariaDB 10.01, dedicated server. In my opinion server is good but code not and this generate long time.

I have second website at the same server (Wordpress) and there load time is good. Results: WebPageTest - Running web page performance and optimization tests...


some tips? Thanks!

For a WordPress site there are several things that could be going on. Two of the most common things that I see come are:

  • theme or plugin making calls out to 3rd party services at the PHP level
  • theme or plugin making a large amount ( or a few slow ) database queries.

Since you mentioned using PHP 5.6, I’d recommend trying out PHP 7. It is significantly faster than PHP 5.X. Before upgrading the live site, test out PHP 7 in a dev environment, to make sure there are no compatibility issues.

Thanks for reply, but the first site with long TTFB isn’t a WP

Sorry, I read that as second WordPress site.

The principle is still the same though. Review the code flow for loading the front of the site for things that could be very expensive. Remote calls to other services, slow database calls, anything that involves a lot of work.

Joseph thanks for tips! Have a nice day!

Hi Mattpl - Something else to consider is the location of your server in regards to the location you’re testing it from. For example, if your servers are in Europe but you’re testing from California that would explain it.

Best to test from where most of your customers are located. And if you want a worldwide presence then there are DNS and CDN optimizations you can do for that.

Is the TTFB consistently slow across multiple regions?

Hi thanks for reply! I’m testing it from Warsaw and Europe ex. Stockholm.
For now I have change php 5.6 to php 7
Remove some Requests, split css&js and min.

Here another test: WebPageTest - Running web page performance and optimization tests...

First byte from test 1: 1.450s
First byte from test 2: 1.081s

Using pingdoom tool to test from Stockohlm, time to load website is 1.5s. When I’m using webpagtest to check time for https://szukampracy.pl (loc. Warsaw) I have full load time ~3.7s. Why is this difference? Server location is near Warsaw