Chapter 18 · 18.3
My website is slow
A slow website costs you visitors and customers. The cause is almost always in the website itself: too many or heavy plugins, no caching or large images. Sometimes your package is reaching its limits. The questions and steps below will help you find the cause.
First, three questions
- Is everything slow, or only the admin area? If only the WordPress admin area is slow, it is usually down to plugins, or a bot hammering your login page.
- Always, or at certain times? If it is only slow at busy times, or when a scheduled task is running, that points to the limits of your package.
- Only for you, or for everyone? Try it on your phone over 4G or 5G, and ask someone else to take a look. If it is only slow for you, the problem is probably your own connection or VPN.
Step 1: measure where the problem is
- Resource Usage in DirectAdmin shows whether your package is hitting a limit, such as CPU, memory, I/O or the number of concurrent processes (see Resource Usage: CPU, memory and processes). A notice about faults means your site was being slowed down at that moment.
- X-Ray shows, per page, which plugin, database query or external call is taking up the time (see X-Ray: tracking down slow pages).
- An external test such as Google PageSpeed Insights shows what a visitor's browser has to load. How to read that report is explained in Reading PageSpeed Insights: Core Web Vitals in plain language.
Step 2: the most common causes
- No caching. Our servers run on LiteSpeed. For WordPress, the free LiteSpeed Cache plugin often makes your site much faster straight away, because pages are no longer rebuilt on every visit. See LiteSpeed Cache for WordPress and a webshop.
- Too many or heavy plugins. Every plugin takes time. Use X-Ray to see which plugins are the slowest and switch off anything you don't need.
- Large images. A 5 MB photo straight from your camera makes every page slow. Resize your images before uploading, or use a plugin that does it for you.
- Bots and attacks. Search engines, AI crawlers or login attempts on wp-login.php and xmlrpc.php can keep your package busy. Check the access log to see which addresses are requested a lot (see Site summary & logs: the error log and the access log).
- An old PHP version. Newer PHP versions are considerably faster. See Selecting the PHP version (Select PHP version).
- A cluttered database. Thousands of old revisions, spam comments or log tables make queries slow. Clean up and optimise the database (see Checking, repairing and optimising a database).
- External components. Fonts, videos, chat widgets and tracking codes from third parties can keep your page waiting. PageSpeed Insights shows which ones they are.
- Cron jobs that run too often (see Cron Jobs: running tasks automatically). These also count towards your limits.
What the visitor sees: speed in the browser
How fast a page feels to a visitor also depends on what the browser has to load. Google measures this with the Core Web Vitals. Four things almost always help:
- Give images a width and height (width and height). The browser then reserves space, so the page doesn't jump when the photo loads.
- Don't lazy-load the most important image. The large photo at the top of a page should not have loading="lazy". Lazy loading is for images further down the page.
- Use WebP or AVIF. These formats are smaller than JPG and PNG at the same quality.
- Resize and compress your images to the size at which you display them.
Step 3: is your package too small?
Have you cleaned up your site and enabled caching, but Resource Usage still shows faults at busy times? Then your site needs more computing power. In My WebOké, go to My Products and Admin and choose Change hosting package. An upgrade takes effect immediately.
Are visitors getting a 503 error or Resource Limit Is Reached? Then also read 503 or 'Resource Limit Is Reached': what now?.
Tip: Is the WordPress admin area slow while the front end is fast? Then look especially at plugins that do a lot in the admin area, such as statistics, backups or security scans that run on the server. Schedule heavy tasks for quiet times.
