The 5,000-listing wall
Directory plugins start fast. The first 200 listings render quickly because WordPress is fundamentally a CMS - reading 200 posts with a few meta values is what it’s good at. Search works. Filters work. The site feels snappy.
Then the listing count grows. At some point search starts feeling slow, then the faceted filters lag, and eventually any query more specific than “all listings” becomes a wait. The 5,000 in the title is a round number for where this tends to bite, not a benchmark we measured. Your host, your theme and the number of filters a visitor stacks all move the line.
A common cause is the same every time: the plugin runs its search through meta_query.
Why meta_query doesn’t scale
meta_query joins the wp_posts table against wp_postmeta once per filter. A query like:
Restaurants in Austin with rating >= 4 and price = $$ and open_now = true
runs four JOINs against postmeta. Each JOIN works against every meta row in the table, whichever listing it belongs to. As an illustration only: 5,000 listings with 30 meta keys each is 150,000 meta rows, and every extra filter adds another pass over them. Indexes help, but the work still grows with each filter and each listing.
WordPress was designed for content sites where meta is read once per post-fetch, not for directory sites where meta is the filter axis.
Questions to put to any directory plugin
You do not need to take anyone’s word on scale, ours included. Most of it can be checked in an afternoon, in the plugin’s own documentation or by looking at the tables it creates in your database.
- Where do filter values live, and which columns carry an index?
- Is the result count a
COUNT(*), or does the plugin load every match and count in PHP? - Is there a page-size ceiling on the front end and in the API?
- What happens to search when 500 listings arrive in one import?
- Which jobs run in the background, and what runs them?
- Can the index be rebuilt from the command line when something goes wrong?
Everything below describes Listora only. For any other plugin, the honest source is its own documentation, or a test import on a staging copy. This post makes no claims about how other plugins store their data.
The fix: a denormalized search index
The correct architecture for a directory at scale is a dedicated, denormalized search-index table. One row per listing, every searchable + filterable attribute as a column (or a FULLTEXT-indexed text field), built at the time the listing is created or edited.
A search query then runs against a single table:
SELECT listing_id FROM listora_search_index
WHERE listing_type = 'restaurant'
AND status = 'publish'
AND city = 'Austin'
AND avg_rating >= 4
ORDER BY is_featured DESC, avg_rating DESC
LIMIT 20;
The common filters (type, status, rating, price, featured, city, coordinates) are real indexed columns, so they need no postmeta JOINs. Indexes do the heavy lifting.
What Listora does differently
Listora ships a dedicated listora_search_index table that’s populated by an indexer that runs:
- On listing create (the listing is searchable the moment it is saved)
- On listing edit
- On a full rebuild, which runs in background batches so it does not block the admin
- On demand via
wp listora reindex, or Settings - Advanced - Rebuild search index
Custom-field filters (cuisine, bedrooms, salary and so on) go through a second table, listora_field_index, which stores one indexed row per field value instead of a postmeta JOIN per filter.
Geo queries use latitude and longitude columns that are indexed, on both the listora_geo table and the search-index table. A bounding box on that index trims the candidate set first, then the exact great-circle (Haversine) distance is worked out on what is left.
Full-text search uses MySQL’s native FULLTEXT index on the search-index table’s title, content and meta text columns.
The result is a search path that reads dedicated index tables instead of stacking meta_query JOINs. No premium infrastructure required.
The tables, and what each one is for
Listora creates its own tables on activation, each with the indexes its queries need. The ones that matter for search are these:
- The search index holds one row per listing: type, status, rating, review count, price, featured flag, author, coordinates, and the text used for full-text matching. It is indexed on type and status together, on featured and rating together, and on rating, created date, price, author and coordinates on their own, plus a FULLTEXT index over title, content text and meta text.
- The field index holds one row per custom-field value, keyed on listing, field and value, with a numeric column and its own index for range comparisons.
- The geo table holds coordinates, city, state, country, postcode and a geohash, with an index on each of those lookups.
- The hours table holds one row per day and time slot for each listing, which is what lets an “open now” filter run without parsing a text field.
Listing values are still saved as ordinary post meta as well. The index tables are copies that search reads, kept in step by the indexer on every save. The trade-off is plain: if something writes to the database behind WordPress’s back, such as a raw SQL import, the copies go stale until you rebuild them. Listora’s own CSV import calls the indexer for each listing as it writes it.
How a search page is built
A request for a page of results takes one of two routes, and the difference is worth knowing.
When a visitor uses only the keyword, listing type, minimum rating, featured or verified toggles, author, or a radius or map area, the database does the work. It runs a COUNT(*) for the total, then a LIMIT and OFFSET query for just the page, so memory use does not grow with the number of matches. The page size is a setting from 1 to 100, and the search API caps per_page at 100.
When a visitor uses category, location, features, tags, custom-field filters, open-now or event-date filters, or the request asks for facet counts, those narrowing steps run in PHP after a first SQL stage. That first stage is capped at 5,000 candidate rows, a safety ceiling that keeps memory bounded. On a directory far larger than that, a broad filtered view works from the first 5,000 candidates rather than from every match, so its total can understate. For keyword searches those candidates are the most relevant rows. For everything else they are the newest.
Most visitors narrow a result set well below 5,000 before the cap matters. It is still a design limit worth knowing about. If a single listing type on your site will hold tens of thousands of listings, test your busiest filtered views on a seeded copy first.
Caching, and when it gets in the way
Search results are cached as transients for a number of minutes. The default is 15, and you can set anything from 0 to 120 in a block called Cache under Settings - Advanced. Setting it to 0 turns the cache off for search.
The cache key includes a version counter. Listora bumps that counter when a listing is created, updated or deleted through its own actions, so a saved change starts a fresh result set instead of waiting for the old one to expire.
Two habits help. Leave the default alone until you have a reason to change it. And after any bulk change made outside Listora, run the index rebuild before you judge the results.
Why this matters for your business case
A directory plugin that hits a wall is a business problem, not only a technical one. You cannot run paid acquisition that targets growth if search times out under the traffic you bought. You cannot pitch a directory as the place to find things if finding things is the slow part.
The architecture decision happens once, at install, and it is expensive to reverse later. A denormalized index moves the work from query time to save time, which suits a directory where listings are read far more often than they are edited. It does not make every limit disappear, and the sections above say where Listora’s own limits are.
Action Scheduler for the rest
Search is the obvious scaling bottleneck. The less-obvious ones are background jobs:
- Sending listing-expiration emails
- Reindexing on bulk updates
- Cron-driven cleanup
- Expiring paid plans and renewals
WordPress’s built-in WP-Cron is request-driven. On a busy site, it fires erratically. On a low-traffic site, it doesn’t fire at all. On a high-traffic site, it fires too often and slows down page requests.
Listora bundles WooCommerce’s Action Scheduler library. Recurring jobs prefer Action Scheduler, with a WP-Cron fallback when it is not available. Jobs queue, get logged, and can be retried. It is the same library WooCommerce stores rely on.
This is the kind of decision that doesn’t matter on day one and matters every day after.
Background work and rebuilds
Listora’s maintenance runs as ten scheduled jobs: expiration checks, draft and review reminders, a daily cleanup that also purges orphaned index rows, expiry of featured status, pruning of the email log, the search reindex, and the two steps of a background import. Recurring jobs go through Action Scheduler when it is available and fall back to WP-Cron when it is not.
A full reindex is not one long request. The Rebuild Search Index button under Settings - Advanced schedules a chain of chunks of 200 listings each, and every chunk schedules the next until all listings are done. From the command line, wp listora reindex works in batches of 500 by default, with --type to limit it to one listing type and --dry-run to preview. The WP-CLI reference lists the other commands.
Large imports follow the same pattern. A CSV import from Settings - Import / Export is queued and processed in chunks of 25 rows, with progress saved after each chunk. A chunk that fails is retried up to three times before the run is marked failed. A file of ten rows or fewer simply runs inline.
A scale checklist before you launch
A directory that looks fine at fifty listings tells you nothing about five thousand. Before you send traffic, work through this on a staging copy:
- Seed volume. Import a realistic file of your own data, since the demo packs are small samples, not thousands of listings.
- Rebuild the index once from Settings - Advanced, so you know the chain completes on your host.
- Load your busiest filtered view and a plain browse page, once with the default cache and once with the TTL set to 0.
- Open the Health Check screen from Settings - Advanced, which verifies that the search index is usable.
- Open Tools - Scheduled Actions and confirm the jobs are running rather than piling up as pending.
- Decide who rebuilds the index, and when, after any bulk edit made outside the plugin.
When none of this matters yet
If you are building a directory of a few hundred listings, almost any plugin will search quickly, and you should pick on features, design and price instead. The architecture matters when you expect to grow, or when you are building for a client whose directory will be large on day one.
Everything described here is in the free plugin. The search and discovery features page shows what is free and what Pro deepens, and Free vs Pro has the full split. If you are moving a large directory over from another plugin, the migration features cover the five importers that exist.
TL;DR
If you’re picking a directory plugin and the listing count will plausibly grow into the thousands, the first question to ask is: does the search run on meta_query or on a dedicated index table? Test it: import a large CSV of listings and run a few facet queries. The plugin that holds up is the one to build on.
Listora was designed around this exact constraint from day one. The search index is in the free plugin, not gated behind a Pro tier.
Try it: download Listora free and run wp listora demo seed --pack=all to load about 128 listings. Then import a few thousand of your own with wp listora import <file> --type=<slug> and watch the facet queries.