A lot of Joomla sites run fine until the database gets big: thousands of articles, hundreds of thousands of related rows, and suddenly peak-hour load times creep up even with caching turned on and unused extensions removed. The usual advice ("enable caching, trim plugins") isn't wrong, but it treats the symptom. If your database is genuinely large, the fix has to happen closer to the database itself — starting with where Joomla stores its session data.
Move sessions out of the database first
By default, Joomla stores session data as rows in the database, which means every logged-in visitor and every front-end session write is competing with your content queries for the same table. On a site with real traffic, that adds up fast. The first, highest-leverage change is switching the session handler away from Database.
Joomla gives you two better options out of the box:
- Filesystem — the simplest swap, and enough to meaningfully reduce database contention on shared hosting where you can't install anything extra.
- Redis (or Memcached) — the better long-term answer if your host supports it. Sessions live entirely in memory, which is both faster and takes the load off MySQL completely rather than just moving it to disk. Joomla still labels Memcached as experimental, so Redis is the safer pick where both are available.

This one setting alone resolves a surprising share of "my site slows down under load" reports, because it removes constant read/write traffic from the same database that's serving your actual content.
Find the queries that are actually slow
Caching and session tuning buy you headroom, but they don't fix a query that's missing an index. If a specific page or component feels slow, don't guess — turn on your database's slow query log (or use your host's query monitoring tool) and look at what's actually running during peak load.
Two things to check once you've found the offenders:
Are the right columns indexed?
Joomla's core tables are indexed sensibly for typical use, but a large, heavily customized site — extra custom fields, category trees, tags, third-party extension tables — can end up with queries that filter or sort on columns with no index at all. A missing index on a large table is often the single biggest cause of a query going from milliseconds to seconds.
Is a third-party extension the source?
If the slow queries trace back to a specific component or module, check whether that extension supports Joomla's caching layer or an external cache like Redis/Memcached. Many well-maintained extensions do; if yours doesn't, that's worth raising with the developer directly; a good developer will usually point you at either a caching option you missed or a fix.
Block the traffic that never needed to hit your database
Not every request to a large Joomla site is a real visitor. Aggressive SEO crawlers and scraper bots (the usual suspects are marketing-tool crawlers, not search engines) can generate a meaningful share of total load on a content-heavy site, and unlike real traffic, blocking them costs you nothing.
Check your hosting analytics (cPanel's AWStats or an equivalent) under something like Robots/Spiders visitors, identify the worst offenders, and block them at the server level. On Apache with mod_access_compat enabled:
SetEnvIf User-Agent "MJ12bot" stayout=1
SetEnvIf User-Agent "AhrefsBot" stayout=1
SetEnvIf User-Agent "DotBot" stayout=1
Deny from env=stayoutOn Apache 2.4 without the compatibility module, use the modern form:
SetEnvIf User-Agent "MJ12bot|AhrefsBot|DotBot" stayout=1
<RequireAll>
Require all granted
Require not env stayout
</RequireAll>On nginx, match the user agent in a map block and return 403. Add whichever bots you see hammering your logs. On a large site with a lot of content and history, this kind of bot traffic can represent a genuinely large share of total requests, and every one of those requests is a database query you didn't need to serve.
Don't ignore the other half of page weight
Database tuning fixes how fast Joomla can build a page; it doesn't fix how heavy that page is once it's built. On a large, content-rich site, unoptimized images are usually the biggest single contributor to load time on the front end, independent of anything happening at the database layer. Converting images to WebP or AVIF and compressing them on upload (which is exactly what JR Image Optimizer automates) closes that gap without touching a single query. For a deeper look at how compression choices interact with page speed, see our piece on the Gzip trap and double compression.
A practical order of operations
- Switch Session Handler from Database to Filesystem, or Redis if your host supports it.
- Turn on slow query logging and find the actual offending queries, not the ones you assume are slow.
- Check indexes on any custom or third-party tables involved in those queries.
- Ask extension developers whether their components support external caching.
- Identify and block aggressive bot traffic at the server level.
- Optimize images separately — it's a different bottleneck, and an easy one to fix.
None of these steps require replacing your hosting or rewriting your site. They just target the actual bottleneck instead of re-applying the same general caching advice that already didn't solve it.
Large Joomla site still slowing down?
I help owners of big Joomla sites find the real bottleneck and fix it — session and query tuning, indexing, migrations, and image weight. Send me your site for a quick look.
See how I can help