Skip to content
0850 554 5439 [email protected]

What do you need help with?

Search the guides and tutorials, or browse the categories.

How do I measure my site's speed? PageSpeed, TTFB and telling hosting-side from site-side problems

Shared Hosting 34 views Step-by-step guide Last verified: Markdown
What you will learnHow to measure site speed consistently, split a measurement into its parts, find out whether slowness is on the hosting side or the site side by comparing TTFB with a static file, and fix the most common site-side problems.
Time15 minutes

1. What does "the site is slow" mean?

A page's load time is made of four parts:

  1. Connection: name resolution (DNS), connecting to the server and setting up the secure connection (TLS).
  2. TTFB (Time To First Byte): the time from sending the request until the first byte arrives from the server. Running PHP, database queries and plugins all happen here.
  3. Download: transferring the HTML, CSS, JavaScript and images.
  4. Rendering: the browser laying out and displaying the page.

Roughly: TTFB tells you about the server and the site's code; download and rendering tell you how heavy the site is. On most slow sites, most of the time is spent in parts 3 and 4.

Load time is made of connection, TTFB, download and rendering. Look first at whichever part is long.

2. Rules for measuring properly

  • Don't trust a single measurement. Measure at least 3 times and take the middle value.
  • Take caching into account. A first visit (empty cache) and a repeat visit are very different. If you use a caching plugin, open the page once and let the cache fill, then measure.
  • Compare like with like. Measure before and after a change on the same page, device and connection.
  • Don't measure while logged in to the admin panel. In WordPress, caching is often off while you are logged in; use a private window.

3. Measuring step by step

3.1 The overall picture with PageSpeed Insights

  1. Open PageSpeed Insights in your browser, enter your site's address and analyse it.
  2. Look at the Mobile result first; search engines rank based on the mobile experience.
  3. The "real user" data at the top (shown if you have enough visitors) is an average of the last 28 days; it doesn't reflect your changes straight away. For an immediate result, look at the lab measurement below it.
  4. Note Time to First Byte, Largest Contentful Paint (LCP) and the image, JavaScript and caching items in the recommendations.

3.2 TTFB with the browser's developer tools

  1. Open your site in a private window, press F12 to open developer tools and go to the Network tab.
  2. Tick Disable cache and reload the page.
  3. Click the first row in the list (the page itself) and read Waiting for server response on the Timing tab. This value is the TTFB.
  4. Also note the total number of requests and the amount of data transferred in the status bar at the bottom.

3.3 Compare with a static file: hosting or site?

This is the most reliable way to separate the cause.

  1. In File Manager, create an HTML file containing only a few lines in a folder inside public_html (for example hiz-testi.html; writing <p>speed test</p> in it is enough).
For comparison, put a one-line static HTML file on your site. Its TTFB shows the base speed of the server and network.
  1. Open this file's address (for example https://ornekfirma.com/gyro-test/hiz-testi.html) as in 3.2 and measure its TTFB.
  2. Do the same measurement for your home page and compare the two results:
    • If the static file is slow too (high connection time and TTFB): the problem is on the network or server side. Try again from another connection (for example mobile data); if the result doesn't change, open a support ticket with your measurements.
    • If the static file is fast but the home page is slow: the server and network are healthy; the time is being spent in the site's PHP code, database queries or plugins. Go to Section 4.

On our test account, the static file's TTFB was a small fraction of the WordPress home page's; the difference was entirely the time WordPress took to build the page.

4. Improve the site side

4.1 Are you hitting a resource limit?

While the site is slow, look at the CPU Usage and Entry Processes rows in the Statistics panel on the cPanel home page. If the percentages are close to the limit, the cause of the slowness is the account's resource limit; follow the steps in guide B42.

If CPU Usage and Entry Processes are near full in the Statistics panel while the site is slow, the cause is a resource limit (see B42).

4.2 PHP version

In MultiPHP Manager in the Software section you can see your site's PHP version. Newer PHP versions are noticeably faster than old ones. If your theme and plugins support it, move to a newer version; the steps for changing the version are in guide B41 (Section 3.4). Test the whole site after switching.

Software → MultiPHP Manager: the PHP Version column shows which PHP version your site runs. Older versions are slower.

4.3 Find heavy files

Open Visitors in the Metrics section, click the icon next to your site and click the Size (bytes) column header to bring the largest requests to the top. Images over a few hundred KB, large JavaScript files and autoplaying videos are the most common causes of slowness.

Metrics → Visitors: click the Size (bytes) column to bring the largest files to the top; large images and scripts are the most common cause of slowness.
  • Resize images to the size they are shown on the page and convert them to WebP.
  • Use lazy loading for images that aren't visible on the first screen.
  • Remove plugins and page builder components you don't use.

4.4 Page caching, compression and browser caching

  • If you use WordPress, a page caching plugin is the single step that lowers TTFB the most.
  • For compressing text files and for browser caching, you can add these rules to your .htaccess file. On our test account, a CSS file was sent compressed and with a one-month cache lifetime using these rules. If your caching plugin already does this, don't add them.
apache
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/css text/plain application/javascript application/json image/svg+xml
</IfModule>
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/css "access plus 1 month"
  ExpiresByType application/javascript "access plus 1 month"
  ExpiresByType image/webp "access plus 6 months"
  ExpiresByType image/jpeg "access plus 6 months"
  ExpiresByType image/png "access plus 6 months"
</IfModule>
Example .htaccess rules for compression and browser caching. On our test account a CSS file was sent compressed and with a cache lifetime using these rules.
Warning

Make a copy of .htaccess before editing it; a wrong line can take the site down with a 500 error (see B41).

5. Check that it improved

  • Repeat the measurements from 3.2 and 3.3 under the same conditions; TTFB and the total data transferred should be lower.
  • Run the PageSpeed Insights lab test again; "real user" data takes a few weeks to improve.
  • In developer tools, the response headers of a CSS file should show content-encoding: gzip and cache-control: max-age=….

6. Symptom → cause → fix

Symptom Likely cause Fix
The static file opens slowly too Network path or server side Measure from another connection; if it continues, open a support ticket with your measurements
Static file fast, high TTFB on the home page Uncached PHP, heavy plugin, slow query Page caching, test by disabling plugins one by one, PHP version
Good TTFB but the page appears late Large images, lots of JavaScript Shrink images, remove unnecessary scripts
Slow only at busy times Hitting resource limits B42
The PageSpeed score differs on every run Lab measurements fluctuate Take the middle of several runs and watch the trend
The admin panel is slow, the site is fast The admin panel isn't cached Review heavy plugins; measure the visitor experience in a private window

7. Frequently asked questions

My PageSpeed score is low but my site still looks fast. Which should I trust?

The score is calculated assuming a slow mobile device and connection. What matters is the "real user" data and the TTFB and LCP you measure yourself. Don't make the score the only goal; start with the big items in the recommendations.

What is a good TTFB in milliseconds?

The commonly accepted target is under 800 ms for most visitors. On a site using page caching, it will be much lower. Your static file's TTFB shows the lower limit you can reach.

My site is slow from abroad. Why?

Physical distance to the server increases connection time. If most of your visitors are in another region, take that into account separately in your measurements; the static file comparison shows here too whether the problem is in the network or the site.

Will a bigger plan make my site faster?

Only if you are hitting resource limits (Section 4.1). If the static file is fast while the page is slow, the cause is usually the site itself; a bigger plan won't fix that.

I installed a caching plugin; why don't my changes show on the site?

The plugin's cache is serving the old page. Use the plugin's clear cache command and check in a private browser window.

Did you know?

Gyro Uptime Monitoring checks your site at regular intervals and provides response time graphs. That way you notice straight away if your site slows down after a plugin update (see I01).

  • B42 — 503/508 "Resource Limit Reached": resource limits
  • B41 — My site won't load: 500 Internal Server Error (PHP version)
  • B43 — My hosting disk space is full
  • B50 — Visitor statistics and logs
  • A07 — Upgrading your plan and buying add-ons
Was this helpful?

Thanks for your feedback!

Still Need Help?

The support team is here around the clock for anything you can't find in the knowledge base.