Why your WooCommerce store is slow (and it isn’t the hosting)
A slow online store often gets a more expensive server thrown at it. Profiling usually shows the problem is in the code and plugins, not the hardware.
When a WooCommerce store starts taking several seconds to load, the first idea is usually to move to more powerful hosting. Sometimes that helps. More often you just pay more and the problem stays, because the server is now doing unnecessary work faster.
Measure first
Before I change anything, I run a profiler. On servers with Plesk, setting up a tool like xhprof takes a bit more effort because each PHP version lives separately, but it’s worth it. After a few requests you can see exactly where the time goes, and the guessing stops.
What I usually find
- URL rewrite rules being regenerated on every request. Usually because a plugin calls this in the wrong place. Every page then does work that should happen only once.
- A page builder rebuilding its CSS. Elementor and similar tools can cache styles, but when the cache keeps getting invalidated, the styles are generated over and over again.
- N+1 queries. Multi-warehouse and multilingual plugins, when combined, like to send a separate database query for every product. A category listing then ends up with hundreds of them.
- No persistent object cache. Without Redis or Memcached, the same data is loaded from the database again on every request.
How to fix it
Each of these has a fairly straightforward fix: move the call to the right place, fix the cache invalidation, batch the queries and turn on an object cache. Together they often make a bigger difference than a new server.
And while we’re on the subject of servers
During one of these fixes it turned out the server was running an operating system that was no longer supported, and package installation was failing. On an old Debian you can work around this temporarily by pointing it to the archive repositories. But that’s only a patch. A server without security updates is a debt you’ll end up paying one day.
A fast online store isn’t a matter of brute force. It’s about making sure the server isn’t doing work it doesn’t have to.