“The server is slow” usually means one of five things, and four of them are not fixed by buying more RAM. Work through this order before you upgrade — it takes ten minutes and often saves the upgrade.
1. Is the CPU actually busy, or waiting?
uptime
top -b -n1 | head -n 15
mpstat 1 5
Look at %steal. Steal is time the host gave to another tenant. Sustained steal above a few percent means the node is oversold or noisy, and no amount of tuning inside your VM fixes it — that is a provider conversation.
High %wa (I/O wait) points at the disk, not the CPU.
2. Memory: used, cached, or swapping?
free -m
vmstat 1 5
dmesg | grep -i "killed process"
Linux uses free RAM for cache, so “95% used” is normal. What matters is si/so in vmstat — swap in/out. Any sustained swapping on a VPS means memory pressure, and the fix is either fewer workers or more RAM.
3. Disk: the usual culprit
iostat -x 1 5
df -h
du -sh /var/log/* | sort -h | tail
Watch %util and await. If util sits near 100% with high await during normal traffic, the storage is the bottleneck — common on SATA-backed plans and on boxes running databases plus logs on one disk.
Also check disk space. A full disk makes MySQL read-only and PHP sessions fail, which users experience as “slow” or “broken”.
4. The web stack, not the server
systemctl status php8.3-fpm
grep -E "pm.max_children|pm.max_requests" /etc/php/*/fpm/pool.d/*.conf
tail -n 100 /var/log/nginx/error.log
Two classic misconfigurations:
- Too few PHP workers — requests queue, TTFB climbs, CPU looks idle.
- Too many workers — each one reserves memory, the box swaps, everything crawls.
A rough guide: 30–40 MB per PHP worker, then leave 1 GB for MySQL and the OS. On a 4 GB box that is roughly 60–70 workers — far more than most sites need. Start at 10 and tune with real metrics.
5. Database queries
mysql -e "SHOW FULL PROCESSLIST"
mysql -e "SHOW GLOBAL STATUS LIKE 'Slow_queries'"
On WordPress, install Query Monitor and look at the slowest queries on a real page. One unindexed plugin query can add a second to every request and will never show up as CPU load.
6. DNS and external calls
If TTFB is fine but the page “hangs”, the server may be waiting on something else: a payment API, a mail server, a DNS lookup with a bad resolver. curl -w with timing breakdown is the fastest way to see it:
curl -o /dev/null -s -w "dns=%{time_namelookup} connect=%{time_connect} ttfb=%{time_starttransfer} total=%{time_total}\n" https://yoursite.com
What to fix first
- Free disk space, cap logs.
- Right-size PHP workers and enable opcache.
- Add page cache in front (nginx fastcgi, LiteSpeed, or a CDN).
- Index the slow queries.
- Only then consider a bigger plan — and check steal first.
If steal is high or the disk is saturated at normal load, upgrading is legitimate. Send us the mpstat and iostat output and we will tell you which of the two it is before you pay for anything.