3 Powerful Ways to Improve WordPress Search So It Doesn’t Suck
The search function built into WordPress core has come a long way over the past few years. However, if you have a large, complex site you still probably aren’t very satisfied with the results it produces. Fortunately, there are lots of ways to improve it.
In this guide, we’ll take a look at how the default WordPress search function works and consider different strategies for improving the performance of this tool.
First things first: This post isn’t about search engine optimization or increasing organic search traffic although we’ve written about that topic several times recently. This tutorial is about improving the experience of website visitors who use your site’s search feature to find content on your site.
If you need to give your WordPress site search superpowers, this guide will give you several ideas of things you can do to improve the relevance of your site’s search results. Continue reading, or jump ahead using these links:
- The Core WordPress Search
- Should You Even Bother Improving Site Search?
- Improving WordPress Site Search
The Core WordPress Search
Up until late 2013, it was pretty common to read articles lamenting the inadequacy of the core search feature. Up until that point, the built-in search function didn’t include any prioritization of search results and only included posts. All search results were returned and sorted chronologically with no further sorting.
While that might have worked for a small blog with a few dozen posts, it would never work for a large website with lots of content.
In late 2013, the search got an upgrade when lead core developer Andrew Nacin pushed an update to the WordPress core that introduced a new search sorting mechanism that prioritized results in the following order:
- Results with a full sentence match in the post title are listed first.
- Results that include all search terms in the title, but not a full sentence match, are listed next.
- Results including any search terms in the title, but not all search terms or a full-sentence match, are listed next.
- Finally, search results that include a full sentence match in the post content come last.
- Within each group, results are further sorted chronologically by publication date.
This update meant that search results were now useful for somewhat larger WordPress websites. However, if your website contains thousands of pages and posts, the built-in search function is still far from ideal.
Should You Even Bother Improving Site Search?
Before you spend any time working on your site’s search feature, you should make sure you’re spending your time fixing a problem worth fixing.
We all have a limited amount of time to spend working on our websites, and you should be selective in how you spend that time. If your site doesn’t include loads of content there’s a good chance the built-in WordPress search feature will do just fine. Try out a couple of searches to see how things go. If the results are satisfactory to you, then they’re probably satisfactory to your users.
While you’re at it, check your website traffic to determine how frequently visitors use your search feature. I used Google Analytics to check how frequently the search tool is used on a small website I run. What I found is that it only gets used about 10 times per month. Obviously, in that case, if I’m going to spend time trying to improve the website, there’s probably a better way to spend it than to spend it tweaking the search feature. However, if your search tool is used hundreds or thousands of times every month, time spent improving site search is probably time well spent.
Another thing to think about is your website’s structure. Is there something about your site’s navigation and design that forces your users to use the search feature?
If your navigation elements are poorly designed, users may feel compelled to use the search feature for lack of a better way to navigate your site.
In that case, fixing your navigation should yield considerably better returns than improving your search feature – although you may want to do both in the long term.
So when should you invest the time and energy to improve your site’s search feature?
I can think of three scenarios where spending time on improving site search makes all the sense in the world.
- If your site is exceptionally large, with thousands of posts and pages, a powerful search feature makes all the sense in the world.
- If your site includes items that are heavily categorized, such as an e-commerce site where each product may fit into a dozen different categories, improving your search feature to make it easier to find content is pretty much mandatory.
- If your site navigation is well-designed and you still find that hundreds our thousands of visitors use the search feature every month, then you should definitely fine-tune your search feature for performance.
Improving WordPress Site Search
Once you determine that improving your site’s search feature is your best move right now, here are four strategies you can consider implementing:
- Consider adding faceted search features.
- Switch to a more powerful search algorithm to improve the relevancy of search results served to your website visitors.
- If your site is a Multisite or BuddyPress network, upgrade to a search tool designed for your site.
- Provide a better user experience for search users.
Not all these strategies will make sense for every WordPress website. Let’s take a look at each, determine when each strategy makes the most sense, and look at some tools you can use to implement each strategy.
Method 1: Faceted Search
Massive e-commerce sites like Amazon and eBay would be pretty much unusable without faceted search. So what is faceted search? Faceted search, sometimes called faceted navigation, is a way of accessing website data based on a system of categories.
The best way to understand a faceted search is to head to Amazon.
Type WordPress into the search prompt and you’ll be presented with thousands of options. As you have probably done dozens or hundreds of times, you can then use the categories and options in the left-hand sidebar to drill-down to the product you are actually looking for.
This is a faceted search: the use of categories and options to filter results until you find the content you’re looking for.
Faceted search is critically important for sites that have a large catalog of heavily-categorized pieces of content. E-commerce sites are the most obvious example, but any site that includes a large number of similar pieces of content is a candidate for faceted search.
Here are some of the best plugins you can use to add faceted search to your WordPress website.
- Search & Filter is an impressive, feature-rich, free faceted search plugin. With Search & Filter, you use any combination of categories, tags, custom taxonomies, post types, and post dates to filter search results. Facets can be manipulated with checkboxes, radio buttons, jQuery range sliders, data pickers, and more. In addition, you can also either use or disable the keyword search prompt, meaning you can use Search & Filter as a primary navigation element. Results are displayed using AJAX, so your site visitors won’t have to wait for a search page to reload.
A premium faceted search plugin which we’ve covered in-depth before. FacetWP uses shortcodes to determine the placement of your search control features and results. Custom fields, tags, and categories can be used to create search facets. Results are presented using AJAX for quick presentation of search results.
Advanced search isn’t a plugin, it’s a PHP framework for developing custom advanced search forms with the option to implement faceted search filtering. If you need a completely custom, powerful, faceted search system, you can use WP Advanced Search to create it. As you can imagine, WP Advanced Search is not for non-technical users.
This relatively new plugin has the potential to turn into something really special. It is powered by the Apache Solr search engine, and if Solr is good enough for Instagram, Netflix, and Ticketmaster, it’s probably good enough for your site. Solr Search for WP enables faceting of search results by tag, category, author, page type, and custom fields. While this plugin is ideally suited to developers in its current state, it has the potential to be a very powerful feature for sites that need fast search, excellent relevancy, and the ability to use search faceting with a large number of search results.
Method 2: More Powerful Search Algorithm
Sites with lots of similar listings will probably get the most benefit out of faceted search, but sites with a ton of written content may be better served to upgrade to a more powerful search algorithm instead. If Amazon was a great example of faceted search, Google is the ultimate example of what can be accomplished with a powerful algorithm.
Think about the differences between results at Amazon and results to a Google search. First, every product at Amazon is highly categorized. Filtering results using facets makes all the sense in the world when the results are all highly categorized. However, results from Google are quite often not as easily categorized.
Are you looking for a search mechanism that is closer to what you see at Amazon or Google?
If you answered Amazon to the last question, go ahead and head back to the faceted search plugins. However, if you answered Google, read on.
One option that is commonly used to improve WordPress search results is to switch to Google Custom Search Engine (CSE). Getting started with CSE is free and makes use of Google’s core search technology to deliver results culled from your website.
The following plugins are all about upgrading the algorithm behind the search tool to produce more relevant results that are ranked more effectively. Some of these plugins use Google Custom Search Engine while others employ different search engines. What they all have in common is that they produce more relevant results than the standard WordPress search feature.
Do away with the WordPress search algorith entirely with Relevanssi, and incorporate a search algorithm that matches partial words, accepts certain search operators, and does a better job of sorting results for relevancy. You can even control the weighting of search terms based on where they appear — in titles, tags, or comments.
With Relevanssi, you also get automatic search analytics, so you know which terms visitors are searching for. Worth noting: the free version of Relevanssi will not work with Multisite. You’ll have to purchase the premium version to use Relevanssi with Multisite.
Install and activate Better Search and it will automatically replace the default WordPress search feature anywhere it appears on your site. Better Search is designed to provide results that are more directly relevant to your website visitors’ search intentions. Both titles and content are considered when ranking search results, or you can turn off relevancy ranking entirely and the results will be sorted by date.
Allow your users to search posts, pages, and custom post types with this free plugin. Two unique features of this plugin include an automatically generated popular search term heat map which you can easily display anywhere on your site and a customizable list of words which will be automatically filtered out of search queries (profanity, for example).
Swiftype Search includes three powerful search enhancements. First, an improved search engine replaces the standard WordPress search function and returns results with improved relevancy. Second, results for specific terms can be customized. This means that you can specify the results that should appear when specific terms are queried. Third, detailed analytics are provided so you know which terms users are searching for. However, a Switftype account is required to access some features of this plugin.
Method 3: Provide a Better Search Experience
If your site doesn’t include thousands upon thousands of posts but you still want to improve the experience of users who use site search, there are many plugins that enhance the power of the built-in WordPress search feature without replacing the core search function.
For example, let’s say you want to add AJAX-powered search results that display on your search page. Well, you can roll your own, but if you want something quicker and little less challenging, there are lots of plugins that bring AJAX-powered results to WordPress search.
Another popular enhancement often added to the standard WordPress search function is the ability to search additional types of content, such as custom post types and media files, or the ability to filter results based on taxonomy.
Under what circumstances should you consider one of these plugins rather than faceted search or an upgraded search engine algorithm? Use of these plugins makes all the sense in the world if the standard WordPress algorithm produces reasonably useful results on your site.
Or maybe you’re saying to yourself: “To heck with it, I don’t care if only one person uses my site’s search every month. I still want to make it better.” In that case, this next round of plugins is definitely for you.
Make search beautiful with this free AJAX-powered plugin. Website visitors will have the ability to search posts, pages, and custom post types, as well limit results to specific categories. The real power of this plugin is on display as results are displayed in a drop-down box as search terms are typed, giving website visitors a preview of the results they’ll see if they complete the search using the current terms.
Display query results in a drop-down box filled with AJAX-generated search results. Users can select from the suggested results or click-through to a complete results page. Search results are grouped into posts and pages, allowing users to pinpoint specific post types when searching for content.
There are dozens of plugins in the WordPress Plugin Directory and at GitHub that I could have included in this category. However, I’ve tried to highlight only the most well-designed, well-documented, and genuinely useful options. However, that doesn’t mean that there aren’t other worthy candidates.
Here’s other options for this category.
- WP Extended Search takes the default WordPress search function and gives you the option to expand the results to include categories, tags, pages, and media files. In addition, you can limit searches to just titles, just content, or search both titles and content simultaneously.
- Relevanssi replaces the regular WordPress search with an improved search engine. You can get enhanced results; including search results based on the order of relevance, fuzzy matching, and a search for quotes.
Also, consider using Swiftype.
Swiftype’s base ranking algorithm is based on industry best-practices and provides more relevant results than the WordPress default. The app goes beyond the basics by providing detailed search analytics and a simple, drag-and-drop interface for re-ordering your search results.
If your site has resources scattered across many posts and pages then the Swiftype search will give you the opportunity to quickly organize results based on topic and relevance.
WordPress sites with products for sale can also benefit from its detailed analytics. Knowing what visitors are searching for on your site can help you to know what products to add to your inventory. It can also help you to tailor your UI and marketing to focus on your most-searched-for products and increase sales.
Swiftype is trusted to handle search functionality for many well-known online businesses, including Shopify, SendGrid, MailChimp, KISSmetrics, Mixergy, and many more.
Summary and Next Steps
Obviously, you’ve got a lot to think about. A search is an important tool on many WordPress websites, and there are many ways to improve the search function built-in to the WordPress core.
Our suggestion is to clone a copy of your site to a local development environment and to try out a few different options. By doing this, you can identify the option that is the best fit for your site and fine-tune it before implementing a new search function on your live website.Tags: