Efficient Content Storage & Indexing (ECSI) is an advanced data storage system for Contextual Related Posts Pro and Better Search Pro, significantly improving the quality of related posts and search results with enhanced performance. The post content is stored in custom database tables optimized for search and retrieval. This feature was first introduced in Contextual Related Posts Pro v4 and Better Search Pro v4.2.
By creating custom database tables with intelligent indexing, ECSI delivers better performance without requiring technical expertise. WordPress multisite users will particularly benefit as queries are simpler and faster.
Overview
ECSI moves processed post content into dedicated, optimized tables, rather than using WordPress’s native post tables. This approach:
- Post content is pre-processed for shortcodes and blocks, eliminating the superfluous markup created by WordPress when saving post content.
- Custom FULLTEXT indices to improve contextual matching.
- Provides better support for multisite WordPress installations.
- Advanced related posts storage and tracking (coming soon in a future version of CRP Pro)
Benefits of ECSI
- Faster Queries
- Pre-processed content eliminates runtime processing
- Optimized table structure for related posts/search queries
- Efficient FULLTEXT indices for content searching
- Better Resource Usage
- Reduced database load
- Optimized storage format
- Efficient taxonomy relationship handling
- Scalability
- Handles large post volumes efficiently
- Optimized for multisite installations
- Batch processing for large indexing operations
How ECSI works behind the scenes
When you enable ECSI, the plugin creates a custom table wp_wz_posts to store the pre-processed content, which includes:
- Multisite Support: Optimized for sites with multiple networks.
- FULLTEXT Indices: Speed up title, content, and excerpt searches.
- JSON Columns: Store taxonomy terms and relationships in a flexible format.
- Generated Columns: Pre-compute values to boost query performance.
Contextual Related Posts Pro and Better Search Pro use the same tables, eliminating any duplication if you’re running both plugins.
When you save a post, ECSI processes it in several steps:
- Renders blocks and shortcodes
- Strips HTML tags and Gutenberg comments
- Optimizes content length (max 50,000 characters)
- Extracts and stores taxonomy relationships
- Maintains primary term information
- Stores processed data in the custom table
This approach eliminates processing time during content retrieval, resulting in faster queries and reduced server load. ECSI queries fully support caching; just remember to enable caching on the settings page.
| Feature | Free Version | Pro Version (with ECSI) |
|---|---|---|
| Storage | Uses WordPress’s native wp_posts table | Uses optimized custom tables |
| Indexing | MySQL FULLTEXT indices on raw post data | MySQL FULLTEXT indices on pre-processed and indexed content |
| Query Performance | Processes content during each query | Faster processing from pre-stored content |
| Taxonomy Integration | Fetched and processed on each load | Efficient taxonomy integration |
| Performance | Basic | Better performance on large sites |
| Multisite Support | Not optimized for multisite | Multisite-aware optimization |
| Content Sync | None | Automatic content synchronization |
Enabling ECSI
Prerequisites
- Contextual Related Posts Pro and/or Better Search Pro activated
- Super Admin for Multisite or Administrator access to your WordPress site
Enable for a single site
- Go to Settings → Related Posts or Better Search → Settings
- Click the Performance tab
- Toggle Use Custom Tables to ON
- Save changes
- Go to Tools → Related Posts Tools or Better Search → Tools
- Click Reindex Custom Tables
- Optionally, check Force reindex to delete existing posts and resync.
- Wait for the process to complete
Enable on a multisite network
- In Network Admin, go to Contextual Related Posts → Settings or Better Search → Settings
- Under the Performance settings section, select Enable Enhanced Content Search Index on all sites.
- Save settings
- Go to Network Admin → Contextual Related Posts → Tools or Network Admin → Better Search → Tools
- Select specific sites or leave all unchecked to process the entire network
- Click Reindex Custom Tables
Content Synchronization
Automatic Updates
ECSI keeps the custom tables consistent with your content through:
- Real-time synchronization when a post is saved
- Synchronization when taxonomy terms are added, changed, or removed outside a post save
- Synchronization when an indexed meta key or a primary-term meta key changes
- Automatic removal of deleted posts
- Handling of post status changes
- Skipping revisions and autosaves
- Multisite synchronization
Changes made outside the post editor are picked up as well. Quick Edit, bulk term changes, REST API updates, and the primary-term keys written by Yoast SEO, Rank Math, and SEOPress all queue a resync of the affected post.
Meta changes queue a resync only when the key is one you have configured for indexing. In Contextual Related Posts Pro that is the Meta keys to index setting on the Performance tab, extendable with the crp_index_meta_keys filter. Better Search Pro has no equivalent setting on its settings page; list the keys you want indexed with the bsearch_index_meta_keys filter instead.
Term renames and large terms
Renaming a term or changing its slug changes the stored taxonomy data for every post assigned to it. Rather than rewriting all of them in the request that saved the term, the plugin schedules a background job and works through the posts in batches of 100, rescheduling itself until the term is fully refreshed.
| Plugin | Scheduled action |
|---|---|
| Contextual Related Posts Pro | crp_refresh_term_posts |
| Better Search Pro | bsearch_refresh_term_posts |
This keeps the term save fast on sites where one category holds thousands of posts. The job runs through WP-Cron, so the refresh completes only as quickly as cron runs on your site. If you have disabled WP-Cron, schedule a real cron job that calls wp-cron.php, or run a force reindex from the Tools page.
Batch Processing
For bulk operations:
- Processes posts in batches of 25
- Shows progress indicators
- Allows stopping and resuming
- Marks tables as ready at 80% completion
- Handles network-wide operations
Compatibility
ECSI is compatible with:
- WordPress multisite networks
- Custom post types (if enabled in Contextual Related Posts and/or Better Search settings)
- Most caching plugins
- Popular WordPress themes and plugins
Frequently Asked Questions
How long does reindexing take?
Reindexing processes posts in batches of 25. A site with:
- 500 posts: about 2-3 minutes
- 5,000 posts: about 15-20 minutes
- 50,000+ posts: may take several hours
This will depend on the server resources on which your site is hosted. The process can run in the background using WordPress’ cron, which is particularly useful if you have a large number of posts.
Will enabling ECSI affect my existing related posts?
Existing related posts will be updated once the cache is invalidated and served from the custom table. You can manually clear the cache to speed up this process.
What happens if I disable ECSI later?
The plugin will revert to using standard WordPress tables. Custom tables remain in your database until manually removed.
Do I need to reindex after adding new content?
No. New and updated content is automatically processed and added to the custom tables.
Troubleshooting
| Issue | Possible Causes | Solutions |
|---|---|---|
| Empty or missing related posts | Reindexing not completed; Custom tables are not enabled properly | Check if custom tables are enabled; Run a force reindex; Verify that the wp_wz_posts table exists and contains data |
| Synchronization issues | WordPress cron is not running; Post hooks are not firing correctly | Check WordPress cron status; Review error logs; Try a force reindex |
| Performance issues | Database server load; Large tables; Insufficient server resources | Monitor database server load; Optimize the database if performance drops; Consider database server upgrades if necessary |
| Renamed term not reflected in results | The background term-refresh job has not run yet; WP-Cron is disabled | Wait for WP-Cron to process crp_refresh_term_posts / bsearch_refresh_term_posts; if WP-Cron is disabled, schedule a real cron job for wp-cron.php or run a force reindex |
| Table status looks wrong after a database change made outside WordPress | Table and index status is cached to avoid repeated SHOW TABLES and SHOW INDEX queries | Better Search Pro re-checks table health live on the Tools and network admin screens; open Better Search → Tools to refresh the cached status |
Best practices
For optimal performance
- Enable ECSI before adding large amounts of content
- Reindex during off-peak hours
- Regularly monitor database performance
- Use a good-quality hosting provider
For multisite networks
- Consider storage requirements before enabling network-wide
- Monitor performance on individual sites
- Use network-wide reindexing for consistency



