118

Do you want to add fuzzy search to your WordPress website?

Adding fuzzy search helps users easily find the information they are looking for, even if they misspell or otherwise incorrectly enter their query. This improves the overall search experience and user engagement on your website.

In this article, we’ll show you how to easily add fuzzy search to your WordPress website.

What is Fuzzy Search And Why Should You Add it to Your Website?

Fuzzy search looks for partial matches for a search term, even if no exact matches are available, and shows users the most appropriate results.

This way, users can find the right content on your website even if they make typos in the search query.

By default, all WordPress websites come with a basic search feature that only shows results for exact matches.

For instance, if a user misspells a term, no results will be shown not even partial matches. This creates a bad search experience for users and often causes them to leave your site. You can see this in the image below.

No search results found

This is where SearchWP comes in. It is the best WordPress search plugin on the market that automatically replaces the default search with a much better search feature.

Unlike the default WordPress search, SearchWP can use fuzzy search as well as look for matches in titles, excerpts, post or page content, products, custom fields, categories, tags, PDF files, and more.

For instance, if a user searches for ‘vintage furniture’ on your WordPress blog but misspells a word, they’ll still be able to find your posts on this topic.

The image below shows the same misspelled search using the SearchWP plugin.

That being said, let’s see how you can easily add fuzzy search to your WordPress website.

How to Add Fuzzy Search to Your WordPress Website

First, you need to install and activate the SearchWP plugin. For more details, please see our guide on how to install a WordPress plugin.

Upon activation, you need to visit the SearchWP » Settings page from the admin sidebar and switch to the ‘License’ tab.

Next, you need to copy and paste your license key and click on the ‘Activate’ button. You can find the license key under your account on the SearchWP website.

SearcWP license

Fuzzy search is not enabled by default in SearchWP, but you can easily turn it on. First, you need to switch to the ‘Advanced’ tab in the plugin’s settings page.

Next, you need to simply check the ‘Partial matches (fuzzy when necessary)’ option under the ‘Actions & Settings’ section.

Check the Partial matches option in the Action & Settings section

Doing so will enable the fuzzy search feature for your site.

Once that is done, you should review the other SearchWP settings for your site. The plugin comes with a bunch of powerful options that allow you to customize the search feature on your website.

You can see them by simply switching to the ‘Engines’ tab under plugin settings.

SearchWP settings

From here, you can assign weight to different search results.

You can also click on the Sources & Settings button to select additional search areas. For instance, you can enable search for comments, products, and more instead of simply posts and pages.

Enable search for posts, comments, and pages

To learn more, see our complete guide on how to improve WordPress search with SearchWP.

Adding a Search Form to Your Website

SearchWP automatically replaces the default WordPress search.

This means that if you have already added the WordPress Search block or widget to your website, then it will start using SearchWP custom algorithm for results.

However, if you have not added the search form to your website, then you can do so by simply adding the Search block or widget to any post, page, or sidebar area.

Simply head over to the Appearance » Widgets page. Find the ‘Search’ block and simply add it to your sidebar.

Don’t forget to click on the ‘Update’ button to store your settings.

Search widget

However, if you are using a block theme, then your theme may not have a widget-ready area. In that case, you won’t see the Widgets screen under the Appearance menu.

Instead, you can use the site editor to add the search block to your website. Simply go to the Appearance » Editor page to launch the editor.

After that, add the search block to your website where you want to display the search form.

Adding search block in site editor

Don’t forget to click on the Update button to save your settings.

You can now visit your website and try out the new more powerful search feature.

You can see in the image below how fuzzy search returns multiple relevant results with a misspelled query.

Search results with fuzzy search

We hope this article helped you learn how to easily add fuzzy search to your WordPress website. You may also want to see our tutorial on how to add multilingual search in WordPress and our list of the most common WordPress errors and how to fix them.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Add Fuzzy Search in WordPress to Improve Results first appeared on WPBeginner.

Want to receive personalized offers?

Allow notifications to get real-time updates about your shopping cart and who knows, you may even receive a sweet discount code 😊

Maybe later