Skip to content
Speed and performance5 min read

Website speed: the complete guide

Short answer

Measure first with PageSpeed Insights, then fix the biggest bottleneck: a slow server response (enable page caching such as LiteSpeed Cache and use a current PHP version), heavy images (resize them and convert to WebP or AVIF), or too much JavaScript, CSS and fonts. A CDN shortens the distance for visitors far from the server.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. Before you start
  2. Step by step
  3. Troubleshooting
  4. On ArabyHost

A page load has three parts: the server builds the HTML, the network carries it and every file it references, and the browser renders it. Speed work means finding which of the three is slow on your site and fixing that first. Guessing wastes time: a caching plugin won’t help a page that’s slow because of a 6 MB hero image, and compressing images won’t help a server that takes two seconds to answer.

Before you start

  • A backup. Minifying and combining files can break layouts, and you want an easy way back.
  • A baseline. Run PageSpeed Insights on mobile for your home page and one key template (a product or an article page), and note the numbers.
  • Admin access to your CMS and cPanel.

Step by step

1. Measure, and know what you’re measuring

PageSpeed Insights shows two things. Field data (“Discover what your real users are experiencing”) comes from real Chrome users over 28 days and is what Google uses. Lab data is one simulated load, useful for diagnosing. Look at the list of opportunities and diagnostics, which tells you what to fix.

Measure server response time (TTFB) separately:

curl -o /dev/null -s -w "TTFB: %{time_starttransfer}s  total: %{time_total}s\n" https://example.com/

Run it three or four times; the first request may hit an empty cache. In the browser, DevTools » Network shows each file’s size and timing in a waterfall.

2. Make the server answer fast

  • Page caching is the biggest single win for CMS sites. Instead of running PHP and database queries on every visit, the server sends a ready copy. On LiteSpeed servers, the LiteSpeed Cache plugin for WordPress does this at the web-server level; LSCache modules also exist for Joomla, OpenCart, PrestaShop and other platforms.
  • A current PHP version: PHP 8.x runs typical CMS code noticeably faster than 7.x, and OPcache keeps compiled code in memory. See choosing your PHP version.
  • Fewer, lighter plugins: each plugin adds code to every request. On WordPress, the Query Monitor plugin shows slow database queries and which plugin causes them.
  • Resource limits: if pages slow down or fail only under traffic, open Metrics » Resource Usage in cPanel to see whether the account hit CPU, memory or entry process limits.

3. Optimize images

Images are usually the heaviest part of a page. Resize to the displayed size, convert to WebP or AVIF, add width and height, and lazy-load what’s below the fold. The details and commands are in optimizing images.

4. Reduce CSS and JavaScript

  • Remove plugins, sliders, chat widgets and tracking scripts you don’t need; third-party scripts are often the slowest part of the page.
  • Load non-critical scripts with defer so they don’t block rendering:
<script src="/js/app.js" defer></script>
  • Minify CSS and JS. In LiteSpeed Cache, the options are under Page Optimization » CSS Settings and JS Settings. Turn them on one at a time and check the site after each.

5. Load fonts efficiently

Arabic web fonts are large because they include many letter forms. Use one or two families and only the weights you need, host them yourself in WOFF2, preload the main one, and let text show immediately with font-display: swap:

<link rel="preload" href="/fonts/cairo-400.woff2" as="font" type="font/woff2" crossorigin>
@font-face {
  font-family: "Cairo";
  src: url("/fonts/cairo-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

6. Turn on browser caching and compression

Returning visitors shouldn’t download the same files again. LiteSpeed Cache has a Browser Cache option; on other sites add to .htaccess:

<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType image/webp "access plus 1 year"
  ExpiresByType image/avif "access plus 1 year"
  ExpiresByType image/jpeg "access plus 1 year"
  ExpiresByType font/woff2 "access plus 1 year"
  ExpiresByType text/css "access plus 1 month"
  ExpiresByType application/javascript "access plus 1 month"
</IfModule>

Check that text files are compressed: curl -sI -H "Accept-Encoding: br, gzip" https://example.com/ | grep -i content-encoding should print br or gzip.

7. Add a CDN for distant visitors

A CDN keeps copies of static files (images, CSS, JS, fonts) in many cities, so a visitor in Riyadh or Casablanca downloads them from nearby. It doesn’t fix a slow server, but it cuts the network time for every file. Cloudflare is a common choice.

8. Clean up the database

On WordPress, delete old revisions, spam comments and expired transients; LiteSpeed Cache includes a Database » DB Optimizer for this. Limit future revisions in wp-config.php with define('WP_POST_REVISIONS', 10);. Check the size of options loaded on every request:

SELECT ROUND(SUM(LENGTH(option_value))/1024) AS autoload_kb
FROM wp_options WHERE autoload IN ('yes','on','auto-on','auto');

If it runs to several megabytes, look for leftovers from deleted plugins.

9. Measure again

Compare against your baseline using the same pages and device. Lab results change immediately; field data updates gradually over 28 days.

Troubleshooting

  • Layout or menu breaks after minifying: turn off CSS/JS combine first, then exclude the file that breaks.
  • Logged-in users or the cart are still slow: pages for logged-in users and carts can’t be fully cached by design. Optimize queries and plugins for those pages.
  • Good score but slow for visitors in another region: that’s network distance; add a CDN.
  • Changes don’t show: purge LiteSpeed Cache, the CDN and your browser cache.
  • Errors under traffic: see 508 Resource Limit Reached.

For WordPress-specific settings, continue with speeding up WordPress.

On ArabyHost

The web server is LiteSpeed, and LiteSpeed Cache comes with one-click WordPress and WooCommerce installs, so page caching works at the server level. PHP 8.1, 8.2 and 8.3 are available and can be switched from cPanel, opened with one click from the Araby Panel. Each account has its own resource limits (LVE) on shared resources, and you can see usage under Resource Usage. The data center is in Germany, close to Europe; for visitors in the Gulf or North Africa, a CDN for static files shortens the distance.

FAQ

What counts as a fast website?

Use Google's Core Web Vitals thresholds as the target: Largest Contentful Paint within 2.5 seconds, Interaction to Next Paint within 200 milliseconds, and Cumulative Layout Shift below 0.1, measured on real mobile visitors.

Why does my PageSpeed score change every time I test?

The lab test simulates one device and network, so results vary between runs. Compare several runs, and give more weight to the field data at the top of the report, which reflects real visitors over the last 28 days.

Will more server resources make my site faster?

Only when the server is the bottleneck, for example when you hit CPU or process limits under traffic. A page full of heavy images or scripts stays slow on any server, so fix those first.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.