Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Make Blog Post Comments Searchable in WordPress

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

Do you want to make blog post comments show up in WordPress search results?

By default, WordPress search doesn’t include comments. This can make it difficult for visitors to find interesting conversations and engage with other users.

In this article, we will show you how you can make blog comments searchable on your WordPress website.

How to make blog post comments searchable in WordPress

Why Make Blog Post Comments Searchable in WordPress?

A lively and interesting comment section can keep people on your WordPress website longer and create a sense of community. With that in mind, you’ll want to do everything you can to get more comments on your WordPress blog posts.

WordPress doesn’t include comments in its search results by default, so visitors may struggle to find interesting discussions and connect with other users.

If you run an online store, then visitors may even use the comments to leave feedback and reviews. By making these comments searchable, you may be able to get more sales.

That being said, let’s see how you can make blog post comments searchable in WordPress.

How to Make Blog Post Comments Searchable in WordPress

The easiest way to make blog post comments searchable in WordPress is by using the SearchWP plugin.

SearchWP is the best custom search plugin for WordPress, used by over 30,000 websites. It’s easy to use and lets you search content that WordPress doesn’t search by default.

For example, you can also easily configure the plugin to include custom post types in WordPress search results, as well as registered users.

To make your blog post comments searchable, you’ll need to install and activate SearchWP. If you need more details, please see our guide on how to install a WordPress plugin.

Upon activation, you will see a popup telling you that SearchWP has already created an engine for you to use.

In this guide, we’ll show you how to change the default engine, so click on the ‘Close’ button to exit the popup.

SearchWP's welcome popup

SearchWP will now take you to the SearchWP » Settings page automatically.

On this screen, click the ‘License’ tab. You can now paste your key into the ‘License’ box.

The SearchWP advanced search WordPress plugin

You’ll find this information in the email you got when you purchased SearchWP and in your account on the SearchWP site.

Once you’ve pasted the license key, click on the ‘Activate’ button next to it.

You are now ready to improve the WordPress search with SearchWP, so go ahead and click on the ‘Engines’ tab.

The SearchWP Engines tab

Here, you can customize the content that SearchWP includes in its results. By default, posts are searchable and are broken into title, content, slug, and excerpt.

To search the comments on your WordPress blog, click on the ‘Sources & Settings’ button.

Configuring the SearchWP search plugin

A popup will now show all the different types of content that SearchWP can search. You may see different options depending on the plugins you have installed.

For example, SearchWP can search WooCommerce products to create a smart WooCommerce product search. By default, the plugin searches your site’s posts, pages, and media.

Go ahead and check the ‘Comments’ box, then click ‘Done.’

How to make your WordPress blog comments searchable

SearchWP will now include all comments in its search results. You can fine-tune how SearchWP searches your blog comments by scrolling to the bottom of the screen.

In the new ‘Comments’ section, click on the ‘Add/Remove Attributes’ button.

Configuring your searchable WordPress comments

On this screen, you’ll see sections for the different content, such as the author’s name, email address, and comment text. You can now check and uncheck these boxes, depending on the content you want SearchWP to search.

In the following image, we are telling SearchWP to look at the comment’s content by checking the ‘Comment’ box, as well as the name and email address of the person who posted it.

Searching your WordPress comments

After making your selection, click on the ‘Done’ button. The options you selected will now appear in the ‘Comments’ section.

For each option, SearchWP has an ‘Applicable Attribute Relevance’ scale. This is the weight that SearchWP will give to each attribute when searching the comments on your blog.

Configuring your searchable WordPress comments

Content that matches an attribute with high relevancy will appear higher in the search results. By contrast, content that matches an attribute that has less relevancy will appear lower in the user’s search results.

By default, all the attribute sliders are set to ‘low,’ but you can change that by dragging the slider to the right.

Every site is unique, so you may want to try different relevancy settings to see what gives you the most accurate and helpful search results.

Changing the SearchWP relevancy settings

If you want to remove an attribute from your search at any point, then simply repeat the steps above, but this time uncheck the box.

When you are happy with how the search is configured, go ahead and click on the ‘Save Engines’ button.

Saving your WordPress custom search settings

After a few moments, SearchWP may show the message, ‘The index needs to be rebuilt.’

If you see this message, then click on the ‘Rebuild Index’ button. This will add all your site’s comments to the search index so that they appear in relevant results.

Rebuilding the SearchWP search index

With that done, comments will start appearing in your site’s search results.

To make it even easier for visitors to find the right comment, you may want to add live Ajax search or add the search bar to your WordPress menu.

How to Change SearchWP Settings

At this point, your comments are searchable. However, you may also want to enable some advanced settings that will help visitors find what they’re looking for.

To take a look at these advanced search settings, click on the ‘Advanced’ tab.

SearchWP's advanced search settings

On this screen, you can change a lot of the plugin’s behavior, such as making adjustments for misspellings.

For example, SearchWP can show a ‘Did you mean?’ correction box if someone makes a spelling mistake in their search query. This box contains results that are similar to the search term.

The following image shows an example of how this might look on your website.

The SearchWP 'did you mean' feature

To use this feature in your searches, go ahead and check the ‘Automatic “Did you mean?” corrections’ box.

You’ll also need to check the ‘Partial matches (fuzzy when necessary)’ box since the ‘Did You Mean?’ feature uses partial matches.

Enabling fuzzy search in SearchWP

For more on this topic, please see our guide on how WordPress search works (and tips to make it better).

We hope this article helped you learn how to make blog comments searchable in WordPress. You may also want to see our picks of the best live chat software for small businesses and the ultimate guide to creating a WordPress membership site.

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.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

5 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Jiří Vaněk says

    It never occurred to me that comments aren’t searchable using the standard WordPress search. Yet, comments are often an excellent additional source of information on a technical website. Thanks for the inspiration on what could be improved in website search, as comments often provide valuable additional information.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.