A client says their website is slow: what to do
It loads, just not quickly. "Slow" can mean the server takes a long time to answer, or the page is heavy once it arrives. They have different fixes, so find out which first.
1. Is it slow for everyone?
Ask the client which page, on which device, and since when. Then time the server from a terminal. This prints how long each stage took, in seconds, counted from the start:
curl -sSL -o /dev/null -w "dns %{time_namelookup} connect %{time_connect} tls %{time_appconnect} first byte %{time_starttransfer} total %{time_total}\n" https://example.comOn Windows, type curl.exe rather than curl, and use NUL instead of /dev/null. Run it three times: the first request can be slower while a cache fills. Then open the site on your phone on mobile data, with Wi-Fi off.
If it is quick for you and slow for the client, the cause may be at their end: their office network, their computer, or distance. A server in one country can feel slow on another continent.
2. Server or page?
- "first byte" is large, often over a second. The server is slow to build the page. Look at the server: step 3.
- "first byte" is small, but the page still takes a long time in a browser. The server is fine, and the page is heavy: large images, many scripts, fonts, chat widgets, trackers. curl only fetches the HTML, not the rest. Google's free PageSpeed Insights times the whole page and lists what is slowing it down.
- "dns" or "connect" is large. Looking up the name or reaching the server is slow. Try again later and from another network; if it stays slow, ask the DNS provider or the host.
3. Why a server gets slow
- Something changed. A new or updated plugin, a theme change, a new feature. Ask what changed around the time it started, and try turning the newest thing off.
- No page cache. Without one, a site like WordPress builds every page from the database on every visit. A caching plugin, or the host's own cache, is usually the biggest single fix.
- The plan's limits. Shared hosting caps how much the site can use at once. The host's resource usage page shows whether it keeps hitting the limit. If it does, the next step is often an error such as 508: see what to do about a server error.
- Bots or a traffic spike. The host's access log shows who is asking. One address asking for hundreds of pages a minute can slow the site for everyone else.
- The database. Years of old revisions, logs and expired data make some queries slow. Many hosts and plugins can clean this up.
4. Check the fix
Run the command from step 1 again, three times, and compare "first byte" with what it was before. For a heavy page, run PageSpeed Insights again. Then check at a busy time of day too: a server that is quick at night can still be slow at lunchtime.
5. Tell the client what happened
Give them a number, not just "it's fixed". For example:
The site was slow because a plugin update stopped the page cache from working, so every visit was rebuilding the page. I have fixed it, and the home page now starts arriving in about 0.3 seconds instead of about 2.
6. Next time, see when it started
The hardest part of a slow site is often "since when?". Bionic Uptime checks each website every minute, alternating between two locations on two different companies' networks, and times each check: from looking up the name to the first 256 KB of the page's HTML, after following any redirects. Like curl, it fetches only the HTML, not the images or scripts. The website's page shows a chart of it, one line per location, using the middle successful check of each hour, for the last day or the last week, with outages shaded. So you can see when it got slower, and whether it was slower from both places. Once there are 30 successful checks in the last day, it also shows the site's typical response time.
We do not email you because a site is slow. A slow site is not a down site, and an alert for every slow minute would teach you to ignore our emails. There is one exception: a check that gets no page back within ten seconds counts as failed. If both locations and a retry agree within 45 seconds, while both locations are known to be working, that is an outage, and each person on that website's alert list gets one email.
3 websites are free, forever, with no card. Looking after several client sites?