Snappy Search Featured Image

Snappy Search Standalone API

$0.00

Description

For plugin heavy WordPress sites, Snappy Search performance often suffers because every request to our REST endpoint has to initialize WordPress core and it’s plugins, unfortunately that’s just how WordPress works. On some large installs, that adds 1-2 seconds of delay per search. Our standalone API avoids that bottleneck by using SHORTINIT and loading only the core functions required to return results. This lightweight approach can reduce response times dramatically, with some client sites seeing sub 100ms search requests. To make the experience feel even faster, we pair those backend gains with a subtle crossfade transition which gives the appearance that there is no load time.

So what’s the catch?

SHORTINIT isn’t officially recommended by WordPress, and compatibility isn’t guaranteed. Because of that, automatic updates should be disabled. Updates can introduce breaking changes, and with SHORTINIT in place, there’s a higher chance something could stop working if core files change.

It also adds a bit of maintenance overhead. If WordPress updates modify any of the core functionality we rely on, the implementation may need to be adjusted.

For that reason, we don’t recommend the standalone Snappy Search API unless it’s set up and maintained by a professional developer.

In a perfect world, the best fix is identifying which plugin is slowing down the REST API and optimizing or replacing it. But in practice, that’s not always straightforward, even on well-built sites.

Installation

We recommend testing this on your staging environment first.

  1. Install Snappy Search 1.6.0 (We have not tested with lower versions)
  2. Take a full backup
  3. Copy search.php to the ROOT of your WordPress directory (Where wp-config.php lives)

Snappy Search will automatically recognize it’s installed and point to the new endpoint