JRMora JSON Search

Description

Default WordPress search relies on heavy MySQL queries using full table scans (LIKE %keyword%). As your site grows with thousands of posts, this process degrades server performance, increases database CPU load, and leads to slow search response times or timeouts.

JRMora JSON Search solves this bottleneck completely by offloading the search process to a lightweight, static JSON file. Upon publishing or updating content, the plugin automatically indexes titles, content excerpts, categories, and tags into an optimized JSON file inside a dedicated /uploads/jrmora-json-search/ directory.

When a user searches on your site, the plugin intercepts the main query, scans the pre-indexed JSON file in milliseconds, and feeds the matched post IDs directly back to WordPress (WHERE ID IN (...)). This bypasses expensive database string comparisons, drastically lowering database load and delivering near-instant search results.

Key Features:

  • Database Relief: Eliminates heavy LIKE %...% queries on full-text content across the database.
  • Universal Theme Compatibility: Transparently hooks into the default WordPress search loop without requiring template edits or shortcodes.
  • Automatic Reindexing: Automatically updates the JSON search file every time a post is published, edited, or deleted.
  • Accent & Diacritics Normalization: Strips accents and special characters during index generation and matching, guaranteeing accurate results regardless of search spelling (e.g., matching “Periodismo” with “periodismo”).
  • Polylang Compatibility: Built-in support to respect multilingual filtering when using Polylang.
  • Performance Banner & Shortcode: Optional performance banner displaying total results count and query execution times, or embeddable via [fast_json_search_stats].
  • Manual Reindex Tool: Includes a simple admin settings page to manually rebuild the search index on demand after bulk content imports.
  • Clean & Lightweight: Zero external dependencies, no extra database tables, zero background cron bloat, and fully internationalized for localization.

When is this plugin most useful?

  • Content-heavy websites, blogs, and digital publications with thousands of published posts.
  • Sites experiencing high server CPU usage or database slow-query logs triggered by native site searches.
  • Hosting environments with strict database resource limits where un-indexed full-text searching degrades performance.

Copyright

JRMora JSON Search is distributed under the terms of the GNU GPL v2 or later.

Screenshots

Installation

  1. Upload the jrmora-json-search directory to the /wp-content/plugins/ directory, or upload the .zip file directly through the WordPress admin dashboard via Plugins > Add New > Upload.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Upon activation, the plugin automatically generates the initial search-es.json file inside your /wp-content/uploads/jrmora-json-search/ directory.
  4. Optional: Navigate to Settings > JRMora JSON Search to review settings and the manual reindex button.

FAQ

How does the plugin replace MySQL search queries?

When a frontend search is triggered, the plugin intercepts the main SQL query, nullifies the standard LIKE %phrase% clause, and searches the local search-es.json file instead. Once matching IDs are retrieved, it supplies those IDs directly into the SQL query using post__in.

Does it create extra custom database tables?

No. JRMora JSON Search does not write any additional tables to your database. It generates a single static .json file inside a dedicated folder within your default WordPress uploads directory.

What happens when I publish or edit an article?

The index is updated automatically in real-time. The plugin listens to native WordPress actions (save_post and deleted_post) to rebuild the index without manual intervention.

Is the JSON file publicly accessible or heavy?

The JSON file only stores essential public information: post IDs, post titles, clean permalinks, stripped content excerpts (first 100 words), and taxonomy terms. It is highly compressed and stripped of unnecessary markup to keep file size minimal.

What happens if I uninstall the plugin?

By default, the generated search-es.json file is kept in your uploads folder to avoid accidental data removal. However, you can enable the “Clean Data on Uninstall” option in the plugin settings page to automatically delete the dedicated directory and clean up all settings upon plugin uninstallation.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“JRMora JSON Search” is open source software. The following people have contributed to this plugin.

Contributors

Translate “JRMora JSON Search” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.0.0

  • Initial official release.
  • Automated JSON index compilation on post save and post deletion.
  • Native search query interception with SQL LIKE clause elimination.
  • Integrated string normalization for diacritics and accent-insensitive matching.
  • Added Polylang language filtering support.
  • Added optional execution time and results counter banner / shortcode.
  • Added manual reindexing option in WP Admin.