Fine tuning the search configuration
After selecting the proper environment and plugins, there are a few tricks to increase search performance.
High performance impact changes
These changes are recommended on most shared hosts and lower performance servers, as well as in cases with thousands of posts. These changes can improve the search performance significantly.
For big databases - Use the Index WP MySQL For Speed plugin
If you have a relatively big database, then the Index WP MySQL For Speed is a amazing tool to generate additional indexes on database tables like the posts, post metadata, users etc.. It can yield a huge performance gain for your overall site as well as the queries.
WARNING! Please be very careful when using any database altering tools. Make sure to have a full website backup before initiating any commands or changes.
Use the index table engine
If your main results are Posts, Pages, Products or other custom post types, you should definitely consider using the Index Table engine.
Using the index table engine is highly recommended if:
there are over 1000 posts or the post contents are lengthy
searching by categories (or tags or any other term) is neccessary
searching by custom fields
searching in media files
Disable search when typing
While it's a great feature, it requires a decent server to handle. Shared hosts tend to have an execution limit, which can be reached very quickly with constant ajax requests.
To disable this feature go to the Search Sources -> Live Search Triggers
panel. t to 'Trigger live search' (see screenshot).
After this change the user will have to hit the Return key or click the magnifier icon to start the ajax search process (depending on your configuration).
Front-end filters
Front-end filters are effective even if they are visually turned off! To disable them, they have to be removed on the search configuration.
Using front-end filters can be a major blow for the overall search performance, especially when combining a lot of filters on a large set of results.
Make sure to minimize the number of front-end filters
Remove the less important filters if possible
Use them in combination with the search cache
Exclusions or inclusions by taxonomy terms or tags
The exclusion/inclusion documentation can be found here.
Minimize the number of items excluded/included - instead of excluding/including by multiple child categories, exclude the parent category only etc..
Do not use the inclusions and exclusions at the same time. In that case using an inclusion should be sufficient, as everything else is excluded.
Disable autocomplete, or use only google as autocomplete source
Autocomplete is triggered on every keystroke, so just like the previous option - unless only google is selected as the source. In that case your server is not invoked in the process.
Solution 1:
Solution 2:
Disable secondary (fill) logic
By default this feature is disabled, but in case you decided to use it, it can cause a decent performance slowdown.
To turn it off, go the the Search Behavior -> Keyword logic & matching
panel and set the "Secondary logic" option:
Enable the search cache
There is a built-in, optional file and database based search cache. To enable it, go to the Cache Settings submenu.
There is either a File or Database caching method. We recommend trying both to find out which one works in your case faster.
Medium performance impact changes
These changes can have a relateively big impact on the overall performance.
Enabling the custom ajax handler
As discussed in the previous section, the ajax performance is unfortunately affected by every single plugin you have installed.
However there is an implemented custom ajax handler, which can try to bypass unneccessary plugin loading, making this process faster.
To enable the custom ajax handler, click the Compatibility Settings
submenu.
Disable image cropping
Cropping images to thumbnails can cause a definite slowdown, mostly in cases where the source images are too big. Image cropping can be disabled on the Caching options
page:
Last updated