Blog

Why your WordPress site is slow in Pakistan, and how to fix it

Ink sketch of a laptop with a half-filled loading bar and a gauge with its needle low.

A WordPress site feels slow in Pakistan for five common reasons. The server may be far away or slow to respond. There may be no page cache. Plugins or the theme may do too much work on every page. Images may be too large. PHP may be out of date. Measure first, find which of these is costing you the most time, and fix that one before you touch anything else.

This guide shows how to measure your site from Pakistan, what server distance costs in real milliseconds, and how to fix each cause.

How do you measure how slow your WordPress site is?

Start with Google’s PageSpeed Insights. Enter your address and it reports two things. The first is real visitor data from Chrome users, if your site has enough traffic. The second is a lab test run from Google’s servers. The real visitor data is the part that reflects your audience.

Google’s Core Web Vitals guide sets the targets for a good experience:

  • Largest Contentful Paint within 2.5 seconds. This is when the main content shows up.
  • Interaction to Next Paint of 200 milliseconds or less. This is how fast the page reacts to a tap or click.
  • Cumulative Layout Shift of 0.1 or less. This is how much the page jumps around while it loads.

Then check the server’s part on its own. Google’s guide to time to first byte calls 0.8 seconds or less good and more than 1.8 seconds poor. Time to first byte is how long the browser waits before the first piece of the page arrives. If it is high, no amount of image work will fix the page, because the delay happens before any image loads.

You can measure time to first byte from your own computer with curl, which is built into Windows, macOS and Linux:

curl -o /dev/null -s -w "connect %{time_connect}  secure %{time_appconnect}  first byte %{time_starttransfer}  total %{time_total}\n" https://example.com/

On Windows, replace /dev/null with NUL, and in PowerShell type curl.exe instead of curl. Run it five times and look at the middle value, because single runs jump around. Test your home page, a blog post and, for a shop, a product page. Do it while logged out, because that is what visitors get.

How much time does server distance add?

We ran this kind of test from an internet connection in Pakistan against servers in data centres where many hosts place their machines. These are the middle values of several runs.

Time to finish the network connection:

  • UAE: about 64 ms
  • Singapore: about 145 ms
  • Frankfurt: about 169 ms
  • London: about 184 ms
  • US East Coast: about 256 ms

Time to the first byte of a tiny response over a new secure connection:

  • UAE: about 180 ms
  • Singapore: about 390 ms
  • Frankfurt: about 520 ms
  • US East Coast: about 740 ms

The second list is the floor for a first visit from Pakistan. Before WordPress runs a single line of PHP, the browser has to look up the domain, open a connection, agree on encryption and send the request. Each of those steps is a round trip to the server, so a server with three times the round-trip time costs about three times as much at each step. Browsers keep the connection open for the rest of the page, so the full cost falls mainly on the first request.

Two things follow:

  • Pick a data centre close to your visitors. If most of them are in Pakistan, a server in the Gulf or in Asia starts several hundred milliseconds ahead of one in the United States.
  • Distance sets a floor, not the total. A server in the UAE that takes 1.5 seconds to build each page is slower than a cached site in Singapore. Fix the server’s own time next.

WordPress’s own performance guide also suggests a content delivery network (CDN) to serve static files such as images from locations closer to each visitor.

Is your site using a page cache?

Without a page cache, WordPress builds every page from scratch for every visitor. That means running PHP and querying the database each time. WordPress’s performance guide says the biggest gain for the smallest effort is in caching. It also warns that without caching, page requests stack up under load and can crash the web or database server.

A page cache saves the finished page and hands the saved copy to the next visitor. Which cache plugin to use depends on your web server:

  • On a LiteSpeed server, use LiteSpeed Cache. It has over 7 million active installs. Its server-level cache needs LiteSpeed, OpenLiteSpeed or LiteSpeed-powered hosting. Its listing says it works with WooCommerce.
  • On Apache or Nginx, use a caching plugin built for those servers, or a cache your host provides. Ask your host which one it supports before you install anything.

Use one page cache, not two. Two caching plugins working on the same pages can conflict.

For a WooCommerce store, the cart, checkout and account pages must never be served from a saved copy, because they are different for every customer. Check that your cache plugin excludes them. After you set up the cache, add something to the cart in a private window and check that the cart shows the right item.

Is the site only slow when you are logged in?

This is a common complaint, and often a good sign. Many page caches serve saved copies only to visitors who are not logged in. When you are logged in as an admin, WordPress builds every page fresh, and it adds the admin toolbar.

Test in a private window. If the site is fast there, your visitors are getting the fast version. The slowness you see is in the admin, where a plugin doing heavy work on every admin screen is a likely cause. That still deserves a look, but it is not what your customers feel.

Are plugins or the theme slowing it down?

WordPress’s performance guide calls plugins “the first and easiest” place to look. Deactivate and delete any you do not use. Then disable the rest one at a time and measure after each, to see whether one of them is costing you most of the time.

Some practical points:

  • Test on a copy of the site if you have one, not on the live shop during business hours.
  • Page builders, sliders, social feed plugins and plugins that load scripts on every page are worth testing first.
  • A theme that loads several font families and large scripts on every page slows every page. Compare it against a default WordPress theme on the same server.
  • If one plugin turns out to be the problem, check its support forum before you remove it. There may be a setting that fixes it.

Are your images too big?

Images are often the heaviest part of a page. The performance guide suggests choosing the right format and compression for each image, and using a modern format such as WebP, which is smaller.

  • Resize photos before you upload them. A phone photo is usually far wider than any space on your page.
  • Use WebP where your setup supports it.
  • Remove images that add nothing, such as decorative sliders on every page.
  • For shops, keep product photos at one sensible size across the catalogue.

Is your PHP version out of date?

WordPress’s requirements page recommends PHP 8.3 or greater. The performance guide adds that newer software often fixes bugs and improves performance. To see your version, open Tools, then Site Health, then the Info tab, and look under Server.

Most control panels let you change the PHP version yourself. Take a backup first, switch, and then click through your site, including the checkout if you run a shop. If something breaks, switch back and update the plugin or theme that failed.

When is the hosting plan itself the problem?

After the cache, plugins, images and PHP are sorted, look at the server if any of these are still true:

  • Time to first byte stays above 0.8 seconds on a simple, cached page.
  • The site slows down or shows errors at busy times, such as during a sale.
  • Your control panel shows you hitting CPU or memory limits.
  • The server is far from your visitors, as in the numbers above.

Ask your host for your account’s resource usage before you move. If you do move, our checklist on what to check before you buy web hosting in Pakistan covers the questions to ask. Our own WordPress hosting runs LiteSpeed, so the LiteSpeed Cache plugin’s server-level cache works there. Once the new site is set up, our guide to installing WordPress lists the first steps, including the cache plugin.

Frequently asked questions

What is a good loading time for a WordPress site?

Google’s targets are a Largest Contentful Paint within 2.5 seconds and a time to first byte of 0.8 seconds or less. Check both in PageSpeed Insights, and use the real visitor data where it is available.

Is a server in Singapore or the UAE better for visitors in Pakistan?

From a connection in Pakistan, we measured about 180 ms to the first byte from the UAE and about 390 ms from Singapore. Both are well ahead of Europe and the United States. The server’s own speed and caching matter as much as the location, so test a real site on the host you are considering.

Does a cache plugin work for WooCommerce?

Yes, as long as it leaves the cart, checkout and account pages uncached. LiteSpeed Cache lists WooCommerce as compatible. Test the cart in a private window after you set it up.

Why is my site fast for me but slow for my customers?

Your browser may have the site saved from earlier visits, or you may be testing from a faster connection. Test in a private window and from the kind of connection your customers use, such as mobile data.

Will a CDN fix a slow WordPress site?

A CDN serves images and other static files from locations near each visitor, which helps when the server is far away. It does not fix a slow server response or a missing page cache, so do those first.

Category:

Written by

Muhammad Dilawar

Muhammad Dilawar

Muhammad Dilawar is a WordPress developer and technical SEO specialist with over 12 years of experience building, optimizing and maintaining websites. He works with WordPress, WooCommerce, server optimization, DNS, SSL, Cloudflare, website security and performance, and is a Top Rated freelancer on Upwork.

Hosting for your WordPress site

Yearly plans in rupees, with the same price at renewal. Free SSL and daily backups on every plan.